node-gyp

npm install <module> persistent error ? (node-gyp build ?)

我们两清 提交于 2019-12-05 03:44:57
I try to install jsdom such: $ sudo npm install -g jsdom # OR $ sudo npm install jsdom After some successfull command, the install quickly fails, with the first error message being after the [....] : $ sudo npm install jsdom npm http GET https://registry.npmjs.org/jsdom npm http 304 https://registry.npmjs.org/jsdom [....] > contextify@0.1.7 install /home/yug/Desktop/QGis/WikiAtlas/1_shaded_relief/test/node_modules/jsdom/node_modules/contextify > node-gyp rebuild gyp: /home/yug/.node-gyp/0.10.25/common.gypi not found (cwd: /home/yug/Desktop/QGis/WikiAtlas/1_shaded_relief/test/node_modules/jsdom

node-gyp compiling against wrong NODE_MODULE_VERSION

女生的网名这么多〃 提交于 2019-12-05 03:41:49
I've set up a Gitlab CI pipeline which is compiling a native nodejs addon in the first stage and running some tests with it in the second one. The job is running on the same Docker image: FROM ubuntu:18.04 RUN apt update RUN apt install -y git cmake gcc build-essential nodejs npm curl RUN npm i -g n RUN n latest RUN npm i -g node-gyp RUN npm i -g yarn Although the both stages are running on the same docker image, I get the following error message when running the test: Error: The module '<path_to_module>' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This

node.js app with node-gyp fails to deploy on azure website

杀马特。学长 韩版系。学妹 提交于 2019-12-05 00:29:49
I have set up an Azure website and I am trying to use a sample application that relies on node-gyp. I am getting this: emote: > node-expat@2.0.0 install C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot\node_modules\node-salesforce\node_modules\xml2json\node_modules\node-expat remote: > node-gyp rebuild remote: remote: remote: C:\DWASFiles\Sites\node-canvas\VirtualDirectory0\site\wwwroot\node_modules\node-salesforce\node_modules\xml2json\node_modules\node-expat>node "D:\Program Files (x86)\npm\1.2.18\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild remote:

How to build nodejs C++ addon depending on a shared library with relative location

自闭症网瘾萝莉.ら 提交于 2019-12-04 16:28:58
I'm trying to build a node.js C++ using node-gyp but can't figure out how to specify the -Wl,-rpath,$ORIGIN so that when loaded from node it could find shared object library that is in the same directory as addon.node . I have tried setting my binding.gyp like this: "libraries": [ "-L../../install_release_x64/", "-llibppp" ], "ldflags": [ "-Wl,-rpath,'$ORIGIN'" ], "cflags_cc": [ "-fexceptions", "-fPIC", "-Wno-unknown-pragmas" ] but when I run $ readelf -d addon.node the result is like this: Dynamic section at offset 0x7d10 contains 29 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED)

Cannot find node-gyp

风流意气都作罢 提交于 2019-12-04 12:53:20
I installed node v0.8.22 with homebrew. I have my node binary in /usr/local/bin/ but I need to recompile a node add-on with node-gyp but it cannot seem to find it in my PATH . I tried running npm install -g node-gyp but it's still not in my path. I noticed that npm -g installs everything into /usr/local/share/npm/bin/ . Does this mean I need to add this to my PATH ? As j_mcnally recommends, you should try adding /usr/local/share/npm/bin/ to your path. There should be a symlink to node-gyp here, which should resolve your problem. I noticed that npm -g installs everything into /usr/local/share

Error: Cannot find module 'nan'

蓝咒 提交于 2019-12-04 11:36:09
I'm working on native Node.js addon and following nan docs I included nan into binding.gyp like: "include_dirs" : [ "<!(node -e \"require('nan')\")" ] Also nan is in npm dependencies. But when I install the package inside the another node module node-gyp is failed with error > 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

when trying to configure or rebuild node-gyp, getting errors: mac osx mavericks

扶醉桌前 提交于 2019-12-04 08:51:03
问题 I'm trying to run node-gyp configure , but am getting the following errors: gyp: binding.gyp not found (cwd: /usr/local/bin) gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:337:16) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Darwin 13.0.0 gyp ERR!

npm install fails with error C2373 with vs2015 update 3

…衆ロ難τιáo~ 提交于 2019-12-04 07:30:37
问题 After reinstalling my machine with windows 10, setting it up with Visual Studio 2015 I encountered this error on installing my git repositories: → npm install fails on different projects with: ... C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: "__pfnDliNotifyHook2": [...] gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:

Can't find Python executable “/path/to/executable/python2.7”, you can set the PYTHON env variable

匆匆过客 提交于 2019-12-04 02:59:33
bufferutil@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil > node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable . gyp ERR! stack at failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:78:16) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which

how to add dependence to static library in binding.gyp node-gyp for node.js extension

北慕城南 提交于 2019-12-04 01:35:03
I have a simple binding.gyp file for building my node.js extension. I want to change the linking method of the library "mylib" and link it statically instead of using shared library. { "targets": [ { "target_name": "myext", "sources": [ "code/main.cpp", "code/load.cpp", "include/load.h" ], "include_dirs": [ "include", "../Library/include" ], "libraries": [ "-lmylib", "-L/home/admin/MyLib/Library/binaries/linux/Release" ], "cflags!": [ "-fno-exceptions" ], "cflags": [ "-std=c++11" ], "cflags_cc!": [ "-fno-exceptions" ] } ] } The static and shared versions of mylib are in the same directory: #