node-gyp

How to debug binary module of nodejs?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 00:12:17
I have a node.js module written in C++ that provides some bindings for a C++ library. The library crashes with SIGSEGV, so I need to debug it with GDB and find out what goes wrong. I already have the source for the module in ./node_modules/somelib/ and if I go to that folder and type npm install the library is compiled and can be used through a require('somelib') from node.js. I can attach gdb to node and reproduce the error, but in the stacktrace I just see node_modules/somelib/Release/somelib.node . I'm not sure if this is important but the library is compiled using node-gyp . Question 1:

NPM install fails with node-gyp

故事扮演 提交于 2019-12-02 18:43:11
We are having problems running "npm install" on our project. A certain file cannot be found : fatal error C1083: Cannot open include file: 'windows.h' It appears to be coming from the node-gyp module : c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_lo ad_hook.c(13): fatal error C1083: Cannot open include file: 'windows.h': No suc h file or directory [D:\ngs-frontend-next\node_modules\browser-sync\node_module s\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\buil d\binding.sln] This node-gyp seems to be a never ending source of pain for us.

NPM: The “ld: library not found for -lgcc_s.10.5” on On OS X El Capitan?

那年仲夏 提交于 2019-12-02 18:15:12
When I use npm install to install dependencies of this repository , I encountered an error like this: > fsevents@0.3.8 install /Users/hanfeisun/Workspace/vue-webpack-example/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents > node-gyp rebuild SOLINK_MODULE(target) Release/.node ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Release/.node] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib

npm install error: “The build tools for v120 (Platform Toolset = 'v120') cannot be found”

一笑奈何 提交于 2019-12-02 17:37:45
While running an npm install that required a node-gyp rebuild, the following build error was thrown: MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution" System Information Windows 10 (x64) Visual Studio 2015 node v0.12.7 npm v2.11.3 node-gyp v2.0.1 tl;dr Use the msvs_version param: npm install --msvs_version=2015 What if the msvs_version

What is node-gyp

霸气de小男生 提交于 2019-12-02 15:00:41
Can anyone explain me what is node-gyp and why it uses my system files to build Node.JS packages. If Ii build a node project and it used node-gyp internally. Then I just tar that project and moved to a different system I untar it there and try to use it Will this approach work? vuza node-gyp is a tool which compiles Node.js Addons. Node.js Addons are native Node.js Modules, written in C or C++, which therefore need to be compiled on your machine. After they are compiled with tools like node-gyp, their functionality can be accessed via require() , just as any other Node.js Module. If you do

node-gyp rebuild error while installing node modules

半城伤御伤魂 提交于 2019-12-02 08:49:52
I tried installing zerorpc package on node using 'npm install zerorpc' and I am getting following error. The error is because node-gyp fails to rebuild. npm http GET https://registry.npmjs.org/zerorpc npm http 304 https://registry.npmjs.org/zerorpc npm http GET https://registry.npmjs.org/underscore/1.3.3 npm http GET https://registry.npmjs.org/node-uuid/1.3.3 npm http GET https://registry.npmjs.org/msgpack/1.0.2 npm http GET https://registry.npmjs.org/zmq npm http 304 https://registry.npmjs.org/node-uuid/1.3.3 npm http 304 https://registry.npmjs.org/msgpack/1.0.2 npm http 304 https://registry

node-gyp compile error c2240 cannot convert from 'v8::Value *' to 'v8:object *volatile'

二次信任 提交于 2019-12-02 07:08:13
The 2440 error point into the ".node-gyp\4.4.5\include\node\v8.h(221)", so I have no idea what's goes wrong. p.s. compiled on a windows machine. Is there any way to figure out which sentence is causing this error, it's my first time to use node-gyp, thanks. Same issue here. Most probably because we use newer nodejs v4.4.5 version and it can no longer work with C++ Build Tools in Visual Studio 2012/2013. (someone else can clarify this?) You can try C++ Build Tools in Visual Studio 2015 but run this before you compile: npm -g install npm@next Refer to here https://github.com/nodejs/node-gyp

Why is node-gyp rebuild failing on Mac OSX El Capitan

烈酒焚心 提交于 2019-12-01 15:05:08
I recently bought a mac, which uses Mac OSX El Capitan v10.11.4. Installed node with homebrew, and am using node v6.2.2 and npm v3.9.5. I'm getting an error with bcrypt during npm install , which I believe derives from a node-gyp rebuild error. I also recently downloaded xcode-select(version 2343) and xcode(7.3.1) (in that order). Here is the full error output after i run npm install : https://gist.github.com/varunjayaraman/5734af617d616437cd5b3456b20bc503 Not sure what's going wrong. I come from linux land and do tend to be wary of not installing from source myself, so maybe that is the cause

Why is node-gyp rebuild failing on Mac OSX El Capitan

巧了我就是萌 提交于 2019-12-01 13:54:55
问题 I recently bought a mac, which uses Mac OSX El Capitan v10.11.4. Installed node with homebrew, and am using node v6.2.2 and npm v3.9.5. I'm getting an error with bcrypt during npm install , which I believe derives from a node-gyp rebuild error. I also recently downloaded xcode-select(version 2343) and xcode(7.3.1) (in that order). Here is the full error output after i run npm install : https://gist.github.com/varunjayaraman/5734af617d616437cd5b3456b20bc503 Not sure what's going wrong. I come

node-gyp troubles with installation

流过昼夜 提交于 2019-11-30 21:07:29
I'm trying to install webworker-thread s, a node addon that requires gyp. I followed the gyp instructions for setup, so far I'm still getting an error when trying to " rebuild ": C:\Program Files\nodejs\node_modules\webworker-threads>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild gyp ERR! configure error gyp ERR! stack Error: spawn ENOENT gyp ERR! stack at errnoException (child_process.js:980:11) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:34) gyp ERR! System Windows_NT 6.1.7601 gyp ERR!