Tag: node gyp

primefaces编辑器:node-gyp重build崩溃

我正在尝试安装使用node-gyp的primefaces包。 但每次都会崩溃。 这里是apm输出: Installing autocomplete-clang to /home/lars/.atom/packages ✗ > runas@1.0.1 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas > node-gyp rebuild > runas@0.5.4 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas > node-gyp rebuild npm http GET https://registry.npmjs.org/underscore-plus npm http GET https://registry.npmjs.org/clang-flags npm http 304 https://registry.npmjs.org/underscore-plus npm http 304 https://registry.npmjs.org/clang-flags npm http GET https://registry.npmjs.org/underscore npm http GET https://registry.npmjs.org/pathwatcher npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/emissary npm […]

运行时的符号查找错误

我试图build立一个lzham的NodeJS绑定,但我不断收到symbol lookup error: […] undefined symbol: […]错误,每当我尝试从lzham调用一个函数。 我已经包括lzham像这样: #define LZHAM_DEFINE_ZLIB_API #include "lzham_static_lib.h" 我的binding.gyp文件如下所示: { "targets": [ { "target_name": "lzham", "sources": [ "lzham.cc" ], "include_dirs": [ "<!(node -e \"require('nan')\")", "lzham/include", "lzham/lzhamdecomp", "lzham/lzhamcomp", ], }, ] } 我正在编译Linux。 var lzham = require('./build/Release/lzham.node'), buffer = require('fs').readFileSync('compressed'); lzham.decompress(buffer); 此代码调用C ++中定义的函数,该函数又调用lzham_z_inflateInit2 ,产生此错误: node: symbol lookup error: /node-lzham/build/Release/lzham.node: undefined symbol: lzham_z_inflateInit2

错误:找不到模块“南”

我正在研究本地的Node.js插件和下面的nan文档 我将nan包含在binding.gyp中,如: "include_dirs" : [ "<!(node -e \"require('nan')\")" ] 另外nan是在npm的依赖关系。 但是当我在另一个节点模块中安装软件包时,node-gyp失败并报错 > nnb@1.0.2 install /Users/Shopgate/sandbox/stress/node_modules/nnb > node-gyp rebuild module.js:338 throw err; ^ Error: Cannot find module 'nan' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at [eval]:1:1 at Object.exports.runInThisContext (vm.js:74:17) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (module.js:460:26) at evalScript (node.js:431:25) at startup […]

npm install上的node-gyp错误:bson和kerberos编译中的致命错误C1083

有没有人有解决scheme的path来成功解决这个问题? 我发现这个错误在Windows上遵循nodejs,express,mongodb教程。 我的环境是Windows 10 x64,nvm for windows(使用v.012.7 x64)。 环境已经安装了vs2015 c ++构build工具,而python 2.7(x64)和系统正在使用它。 node-gyp通过npm install全局安装。 我得到的编译错误(针对bson和kerberos上的许多文件)如下: D:\projects\express-tut\nodetest1> npm install > bson@0.2.22 install D:\projects\express-tut\nodetest1\node_modules\bson > (node-gyp rebuild 2> builderror.log) || (exit 0) D:\projects\express-tut\nodetest1\node_modules\bson>if not defined npm_config_node_gyp (node "C:\Users\Javier\AppData\Roaming\nvm\v0.12.7\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Los proyectos de esta solución se van a compilar de uno en uno. […]

节点JS – 模块没有自行注册

我经历了不同的职位,其中大部分人build议重build/重新安装/更新npm,我尝试了,但没有帮助。 我想用C ++的node.js的例子,下面是文件的细节 TestNode.cpp #include<iostream> class TestNode { public: void printHelloW() { std::cout << "Hello World!!!"; } }; binding.gyp { "targets": [ { "target_name": "newexample", "sources": [ "TestNode.cpp" ] } ] } 现在来执行,它会抛出错误,说模块不是自我注册。 D:\newexample>node-gyp configure gyp info it worked if it ends with ok gyp info using node-gyp@3.3.1 gyp info using node@5.10.0 | win32 | […]

从node-gyp调用make

我正在使用node-gyp构build一个在Linux上用C ++编写的本地Node.js插件。 加载项依赖于另一个共享库。 这个库目前不是用gyp构build的,它只是一个makefile。 如果我先构build共享库,然后在我的binding.gyp文件的主目标中构build指定“libraries”值的附加组件,则一切正常。 但是,我想要做的是通过在共享库的makefile上调用make,从node-gyp进程内的源代码构build共享库。 我尝试使用'action'属性添加一个依赖的目标到附加的binding.gyp并使主目标依赖于它: { "target_name": "other_library", "type": "none", "actions": [ { "action_name": "build_other_library", "inputs": [], "outputs": [ "/path/to/build/output/libother.so" ], "action": [ "make", "-C", "/path/to/makefile" ] } ] } 这不完全工作。 它正在发现其他makefile和make正在启动(我可以看到这发生与–verbose设置),但生成文件不正确执行。 GNU make的隐式构build规则似乎在共享库的makefile运行时被压制。 这意味着.cc和.cpp文件不被编译为.o文件。 我意识到node-gyp本身就是从binding.gyp中的目标生成一组加载项的makefile文件,共享库的makefile文件正在从其中生成。 它是否inheritance了node-gyp的make设置,包括抑制内置规则? 有没有办法解决它? (除了向共享库的makefile中添加显式构build规则)? (我已经尝试用$(MAKE)replacemake,这没有什么区别)。 编辑: 在共享库上运行GNU make,使用shell指定的-d(即node-gyp之外),为典型源文件search隐式规则如下所示: Considering target file `code.o'. File `code.o' does not exist. Looking […]

如何根据具有相对位置的共享库构buildnodejs C ++插件

我正在尝试使用node-gyp构buildnode.js C ++,但无法弄清楚如何指定-Wl,-rpath,$ORIGIN以便在从节点加载时可以find相同的共享对象库目录作为addon.node 。 我已经尝试设置我的binding.gyp像这样: "libraries": [ "-L../../install_release_x64/", "-llibppp" ], "ldflags": [ "-Wl,-rpath,'$ORIGIN'" ], "cflags_cc": [ "-fexceptions", "-fPIC", "-Wno-unknown-pragmas" ] 但是当我运行$ readelf -d addon.node的结果是这样的: Dynamic section at offset 0x7d10 contains 29 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [liblibppp.so] 0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] […]

Node.js:由于node-sass和node-gyp,Python没有findexception

突然在我的jenkins环境之一构build已经开始失败,而在本地机器似乎工作正常,因为我已经安装了python, 从日志中,我能够检测到问题是与内部依赖关系是node- gyp v3.5.0从node-sass v3.8.0,当我通过访问这个关于node- gyp的研究并find了Python需要安装的先决条件。 所以我的问题是,我可以安装什么版本的节点sass来绕过这个,或者是有更好的解决scheme,因为我的构build运行良好,直到今天早上在相同的环境。 节点v5.10.1 错误日志 gyp verb check python checking for Python executable "python2" in the PATH gyp verb `which` failed Error: not found: python2 gyp verb `which` failed at getNotFoundError (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:13:12) gyp verb `which` failed at F (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:68:19) gyp verb `which` failed at E (C:\Program Files […]

node-gyp configure来释放模式

您好我正在尝试编译一个node_modules作为发布模式,但我无法成功configuration为发布模式。 我运行node-gyp configure ; 生成的configure.gypi # Do not edit. File was generated by node-gyp's "configure" step { "target_defaults": { "cflags": [], **"default_configuration": "Debug",** "defines": [], "include_dirs": [], "libraries": [] }, 我试着用-DBUILDTYPE=Release和BUILDTYPE=Release但是没有成功

Socket.io编译错误

这是错误即时获取.. > ws@0.4.25 install C:\Users\Darryl\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws > (node-gyp rebuild 2> builderror.log) || (exit 0) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Users\Darryl\.node-gyp\0.8.7\deps\uv\include\uv.h(55): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory [C:\Users\Darryl\node_modules\socket.io\nod t.io-client\node_modules\ws\build\binding.sln] Project : warning PRJ0018: The following environment […]