Tag: node gyp

npm安装失败,因为node-gyp失败。 怎么修?

我最近试图为我们的项目做一个干净的安装。 但是现在npm install在Ubuntu 17.04上失败了。 我已经改变了节点,npm,node-gyp和python的版本,我没有成功。 这是由于对node-gyp或其他东西的改变? 运行: node-gyp rebuild 给我: gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@7.10.1 | linux | x64 gyp info spawn /usr/bin/python2 gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args […]

Node.JS – 在使用npm install时,与Node-gyp和/或ELIFECYCLE错误

我试图安装npm库“夏普”,但是当我尝试运行npm安装命令,我得到这在我的控制台: > sharp@0.18.2 install C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp > node-gyp rebuild C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\apixe\AppData\Roaming\npm\node_modules\npm\bin\node-gyp- bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: Cannot find module 'minimatch' gyp ERR! stack at Function.Module._resolveFilename (module.js:485:15) gyp ERR! stack at Function.Module._load (module.js:437:25) gyp ERR! stack at Module.require (module.js:513:17) gyp […]

节点GYP。 MSBuild.exe失败,退出代码:1

我试图安装尖锐的模块,这需要:C ++编译器 – 我下载了Visual Studio 2017和Visual C ++构build工具node-gyp – 它已成功安装 但运行'npm install -g sharp'我有很多错误 gyp ERR! 堆栈错误: E:\VS\MSBuild\15.0\Bin\MSBuild.exe失败,退出代码:1 gyp ERR! 在ChildProcess.onExit(C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ node-gyp \ li \ build.js:258:23) gyp ERR! 在emitTwo(events.js:125:13) gyp ERR! 在ChildProcess.emit(events.js:213:7) gyp ERR! 在Process.ChildProcess._handle.onexit(internal / child_process.js:200:12) gyp ERR! […]

运行时的node-gyp命令不使用cmd-package

我希望能够使用node-gyp configure和node-gyp构build,而无需使用cmd或软件包(如node-cmd)。 运行时需要能够为当前平台生成适当的项目构build文件,并生成编译后的.node文件,而不需要cmd命令。 有没有一个解决scheme或包,可以生成相同的结果,而不需要运行cmd命令?

将本地node.js扩展与支持libstd的c ++ 17链接起来

我试图在构build它之后在linux机器上使用我的本地node.js插件。 而且我收到以下错误: Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /root/addon/node_modules/addon/build/Release/addonstrong text.node) 经过一番调查 – 我明白我需要链接编译的插件正确的libstdc ++库(似乎是libstdc ++。so.6)。 但使用的标志似乎没有什么好处 – 这是使用的binding.gyp的一部分: 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'conditions': [ ["OS=='linux'", { 'cflags_cc': [ '-lstdc++ -std=c++17' ], 'link_settings': { 'ldflags': [ '-R,<(module_root_dir)/lib/linux/libstdc++.so.6' ], 'libaries': ['<(module_root_dir)/lib/linux/libstdc++.so.6' ], } }] 这里有一个相关的问题 – 但是他们通过改变环境variables来解决这个问题,而不是在编译过程中连接它。

如何根据configuration更改库path?

我正在构build一个需要链接静态库的本地模块。 该库的path。 我的binding.gyp文件有以下外观: { "targets": [ { "target_name": "DcpServer", "sources": [ "DcpServer.cc" ], "include_dirs": [ "../../coratools", "../../../boost-1.65.1" ], "libraries": [ "<(module_root_dir)/../../coratools/release_uni64/coratools.lib" ], "defines": [ "CSIWEB_EMBEDDED", "UNICODE", "_UNICODE" ], "configurations": { "Release": { "msvs_settings": { "VCCLCompilerTool": { "ExceptionHandling": 1, "RuntimeTypeInfo": "true" } } }, "Debug": { "msvs_settings": { "VCCLCompilerTool": { "ExceptionHandling": 1, "RuntimeTypeInfo": "true" } } […]

nodejs:没有返回值的函数模​​板

我遵循node.js的指令来实现工厂包装对象。 到目前为止它的工作。 但是我没有得到的是一个没有返回值的函数。 即:(在链接中的例子的扩展) 在myObject.h : tpl->PrototypeTemplate()->Set(String::NewSymbol("some"), FunctionTemplate::New(something)->GetFunction()); static void something (const v8::Arguments& args); 和myObject.cc void MyObject::something(const Arguments& args) { .. something without return value … } 不起作用。 为什么? 我得到以下错误: error: invalid conversion from 'void (*)(const v8::Arguments&)' to 'v8::InvocationCallback {aka v8::Handle<v8::Value> (*)(const v8::Arguments&)}' [-fpermissive] error: initializing argument 1 of 'static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>)' [-fpermissive] […]

尝试安装npm软件包'libxmljs'时出错

当我尝试安装libxmljs npm软件包时,出现以下错误信息。 $ sudo npm install -g libxmljs npm http GET https://registry.npmjs.org/libxmljs npm http 200 https://registry.npmjs.org/libxmljs npm http GET https://registry.npmjs.org/bindings/1.0.0 npm http 200 https://registry.npmjs.org/bindings/1.0.0 npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz > libxmljs@0.8.1 install /usr/lib/node_modules/libxmljs > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/support/.node-gyp/0.10.23" gyp […]

sudo npm install bignum -g:OSError:权限被拒绝

我尝试安装bignum时遇到此错误。 系统信息: nodejs PPA ppa:chris-lea / node.js node -v v0.10.26 npm -v 1.4.3 Ubuntu 12.04 2.6.32-042stab081.5 $ sudo npm install bignum -g npm http GET http://registry.npmjs.org/bignum npm http 304 http://registry.npmjs.org/bignum > bignum@0.6.2 install /usr/lib/node_modules/bignum > node-gyp configure build Traceback (most recent call last): File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module> sys.exit(gyp.script_main()) File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 534, in […]

在WebFaction上的BCrypt Node.Js不安装

我的Node.Js应用程序依赖于bcrypt。 它在我的本地服务器上工作正常,但是当我closuresWebFaction服务器的存储库时 ,bcrypt似乎并不想安装(或编译?)在那里。 我试了两个npm安装 (它在packages.json依赖项中列出)以及 npm install bcrypt 但没有一个工作,我得到以下types的错误: make: Entering directory `/home/noduslabs/webapps/infranodus/infranodus/node_modules/bcrypt/build' CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o ../src/bcrypt_node.cc: In function 'v8::Handle<v8::Value><unnamed>::GenerateSalt(const v8::Arguments&)': ../src/bcrypt_node.cc:257: error: invalid conversion from 'void (*)(uv_work_t*)' to 'void (*)(uv_work_t*, int)' […] make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1 make: Leaving directory `/home/noduslabs/webapps/infranodus/infranodus/node_modules/bcrypt/build' gyp ERR! build error gyp ERR! stack Error: `make` failed […]