node-gyp

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

我的梦境 提交于 2019-12-07 01:01:09
问题 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

node-gyp compiling against wrong NODE_MODULE_VERSION

我的未来我决定 提交于 2019-12-06 20:59:45
问题 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 '

NodeJS - Cannot open include file: 'unistd.h':

狂风中的少年 提交于 2019-12-06 15:29:26
I am using VisualStudio 2012 and run on a windows 7 machine. I want to execute the command make all under my windows machine. For this I installed Make for Windows . Furthermore, I want to compile node library talib . I opened the make file to execute the commands by nodeJS itself. That`s the command I want to run: cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build The first part, runs well: cd ./src/lib && node build.js However, running the second part cd ../../ && node-gyp configure && node-gyp build , I get several errors: Kalimini@Kalimini-PC ~/nodeWorkspace

Node-gyp cannot compile a nodejs extension ('fatal error, thread' file not found)

烈酒焚心 提交于 2019-12-06 10:48:10
I have this node extension made by a colleague and I'm trying to compile it through node-gyp configure (everything alright) and then node-gyp build ( fatal error, 'thread' file not found ). Now, I believe this is a problem of gcc, and I read somewhere that I need as flag -stdlib=libc+++ . My binding.gyp file looks like this: { "targets": [ { "target_name": "overcpu", "sources": [ "overcpu.cpp" ], "cflags" : [ "-stdlib=libc++" ] } ] } But I still get the error. I installed XCode and the developer tools, moreover not satisfied I installed gcc through brew . Unfortunately I keep receiving the

How should binding.gyp be written to build a Node.js addon with OpenNI?

十年热恋 提交于 2019-12-06 10:41:47
I'm trying to build a Node.js addon that makes use of OpenNI. I haven't used Node-gyp before so I'm trying to set up the binding.gyp file so that it includes the OpenNI library as part of the build. The code I'm actually compiling is just the Hello World example . The binding.gyp file I'm using is based on the one from NUIMotion on Github, which is doing something similar. Here's mine: { "targets": [ { "target_name": "onijs", "sources": [ "src/main.cpp" ], "include_dirs": [ "./src/Include" ], "libraries": [ "-lOpenNI2", "-Wl,-rpath ./" ] } ] } Here's what I've done (working in OSX): Created a

Error: Cannot find module 'nan'

荒凉一梦 提交于 2019-12-06 05:01:31
问题 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.

Windows 8 : `node-gyp rebuild` Exit status 1 installing contextify as dependency of zombie

心已入冬 提交于 2019-12-05 18:55:53
I'm trying to install zombie js, and get this error: > contextify@0.1.8 install C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify > node-gyp rebuild Das System kann den angegebenen Pfad nicht finden. C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify>node "C:\Program Files (x86)\nodejs\nod e_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

Building modules using node-gyp on Openshift

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 12:15:32
When trying to build modules that require node-gyp like node-canvas on Openshift I get this error: > canvas@1.2.3 install /var/lib/.../repo/node_modules/canvas > node-gyp rebuild Traceback (most recent call last): File "/opt/rh/v8314/root/usr/bin/gyp", line 15, in <module> import gyp ImportError: No module named gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/opt/rh/nodejs010/root/usr/lib/node_modules/node-gyp/lib/configure.js:343:16) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process

How to specify additional include directories for msbuild.exe

痞子三分冷 提交于 2019-12-05 10:36:33
I am attempting to install the nodejs module ibm_db. The issue I am having is that in order to install this module node-gyp needs to build it using msbuild, but it won't detect some header files I have installed. How do I add the directory of my additional header files to some path so hatt msbuild.exe will find them when trying to compile any project? On linux I simply set cpath= and everything build just fine. Thanks! MSBuild exposes special properties for resolving references in build time. You can set AssemblySearchPaths and AdditionalLibPaths . E.g. msbuild your.sln /p:AssemblySearchPaths=

How to rebuild node.js addon when source changes

六月ゝ 毕业季﹏ 提交于 2019-12-05 10:08:19
I have a node.js app and I have created a native addon. (In case you need background info, native addons for node.js can be created like this ). In my development environment I want it to watch source files (these are C++ source files, in this case) and automatically rebuild my addon when the C++ source files change, and also automatically restart the node application after the build completes. I'm certain there's more than one way to accomplish this, but I went down the road of trying nodemon. But I couldn't figure out how to get nodemon to wait for the build to finish before restarting the