`npm install npm` gives gyp ERR and npm ERR - javascript

Why do I get this strange error when doing sudo npm install npm? I also sometimes get it when trying to install other modules!
Error:
> scrypt#6.0.3 preinstall /home/user/code/project/api_v0.8/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /home/user/code/project/api_v0.8/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/project/api_v0.8/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/project/api_v0.8/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN api_v0.8#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
What can I do, to have a clean install of my packages?

To solve this, install node version manager:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
user node v8.15.0:
nvm install 8.15.0
nvm use 8.15.0

Related

Couldn't install npm packages - bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build` in Ubuntu 18.04

I'm trying to npm install (note: via lerna bootstrap) a project in Ubuntu 18.04. I face an error (npm ERR! bcrypt#3.0.6 install: node-pre-gyp install --fallback-to-build
) and could not move forward.
I've tried installing node-gyp, node-pre-gyp and apt-get build-essentials as well, believing it could be because of C++ compilation issue, but no luck.
Versions:
Node: v10.16.0
NPM: 6.9.0
ren#renish:~/Src/company$ sudo npm run bootstrap
npm WARN lifecycle The node binary used for scripts is /bin/node but npm is using /snap/node/2485/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> company# bootstrap /home/ren/Src/company
> npm install && npx lerna bootstrap
npm WARN company# No repository field.
npm WARN company# No license field.
audited 43804 packages in 3.726s
found 41 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
lerna notice cli v3.15.0
lerna info Bootstrapping 7 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in 'company_api'
lerna ERR! npm install stdout:
> bcrypt#3.0.6 install /home/ren/Src/company/packages/api/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
Failed to execute '/snap/node/2485/bin/node /snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
lerna ERR! npm install stderr:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt#3.0.6 and node#10.16.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/ren/Src/company/packages/api/node_modules/bcrypt/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ren/Src/company/packages/api/node_modules/bcrypt/build'
gyp ERR! System Linux 5.0.0-25-generic
gyp ERR! command "/snap/node/2485/bin/node" "/snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /home/ren/Src/company/packages/api/node_modules/bcrypt
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/snap/node/2485/bin/node /snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ren/Src/company/packages/api/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.0.0-25-generic
node-pre-gyp ERR! command "/snap/node/2485/bin/node" "/home/ren/Src/company/packages/api/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ren/Src/company/packages/api/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#3.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ren/.npm/_logs/2019-08-16T13_52_33_286Z-debug.log
lerna ERR! npm install exited 1 in 'company_api'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! company# bootstrap: `npm install && npx lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the company# bootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ren/.npm/_logs/2019-08-16T13_52_33_951Z-debug.log
Could someone throw some light on this?
Well this is a version AND a access problem is pretty clear in the error message. changing the permission is one step but it looks like you need to update your:
node
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
and also your system linux version for some reason :
gyp ERR! System Linux 5.0.0-25-generic

Error: Cannot find module 'xml2json'

When run my project package, i have getting above title error, after i trying to install that packages using
npm install xml2json
but, i have getting below error only, can you pls give me suggestions or idea to get out from this issue...
D:\xampp\htdocs\podio>npm install xml2json
> node-expat#2.3.16 install D:\xampp\htdocs\podio\node_modules\node-expat
> node-gyp rebuild
D:\xampp\htdocs\podio\node_modules\node-expat>if not defined npm_config_node_gyp
(node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_mo
dules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Warning: Missing input files:
D:\xampp\htdocs\podio\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\
libexpat\version.c
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [D:\xampp\htdocs\podio\node_modules\node-expat\build\b
inding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:219:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\xampp\htdocs\podio\node_modules\node-expat
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "xml2json"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! node-expat#2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.16 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\xampp\htdocs\podio\npm-debug.log
Edit :: 1
After i have installed updated visual studio 2005 to 2012 im getting below error when i have run npm install xml2json and npm install xml2json --unsafe-perm,
C:\Users\Desktop\New folder\action>npm install xml2json
> node-expat#2.3.16 install C:\Users\Hoffensoft\node_modules\node-expat
> node-gyp rebuild
C:\Users\Hoffensoft\node_modules\node-expat>if not defined npm_config_node_gyp (
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modu
les\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Warning: Missing input files:
C:\Users\Hoffensoft\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\li
bexpat\version.c
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
xmlparse.c
xmltok.c
xmlrole.c
c:\users\hoffensoft\node_modules\node-expat\deps\libexpat\lib\siphash.h(201): w
arning C4244: 'initializing' : conversion from '__int64' to 'char', possible lo
ss of data (..\..\..\deps\libexpat\lib\xmlparse.c) [C:\Users\Hoffensoft\node_mo
dules\node-expat\build\deps\libexpat\expat.vcxproj]
win_delay_load_hook.cc
expat.vcxproj -> C:\Users\Hoffensoft\node_modules\node-expat\build\Release\\l
ibexpat.lib
node-expat.cc
win_delay_load_hook.cc
C:\Users\Hoffensoft\node_modules\nan\nan.h(75): fatal error C1060: compiler is
out of heap space (..\node-expat.cc) [C:\Users\Hoffensoft\node_modules\node-exp
at\build\node_expat.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:219:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Hoffensoft\node_modules\node-expat
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Hoffensoft\pac
kage.json'
npm WARN Hoffensoft No description
npm WARN Hoffensoft No repository field.
npm WARN Hoffensoft No README data
npm WARN Hoffensoft No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "xml2json"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! node-expat#2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.16 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Hoffensoft\Desktop\New folder\action\npm-debug.log
Thanks in advance, Gopal R
I have solved this
Use this command npm install xml2json-light
and change let parser = require('xml2json'); to let parser = require('xml2json-light');
It worked for me
I have solved this. If you notice this part of the command else (node "" rebuild ) what I think is happening is that it is incorrectly evaluating if not defined npm_config_node_gyp as false and trying to run nothing instead of node-gyp. What you need to do is define your npm_config_node_gyp variable. You can do this like so:
export npm_config_node_gyp=<PATH_TO_NODE_GYP_PACKAGE_FOLDER> remember that Windows will need double backslashes. For me, it looked like this:
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp
Edit:
There is another step after my fix. When executing my code, the expat bindings were missing. To fix it, add the bin folder and node-gyp executable to the npm_config_node_gyp variable and run node-gyp rebuild in the node_modules\node-expat folder. e.g.
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp\\bin\\node-gyp.js
cd node_modules\node-expat
node-gyp rebuild

Installation of imagemagick-native node with linuxbrew

I am trying to install imagemagick-native. It will through an error
i am using command to install.
npm install imagemaick-native --save
> imagemagick-native#1.9.3 install /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
> node-gyp rebuild
/bin/sh: 1: Magick++-config: not found
gyp: Call to 'Magick++-config --ldflags --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/kspx/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.0-75-generic
gyp ERR! command "/usr/bin/nodejs" "/home/kspx/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/kspx/Desktop/MyData/Projects/Node/vcc-api/node_modules/imagemagick-native
gyp ERR! node -v v4.8.3
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
WARN VinCompass#0.0.1 No description
npm WARN VinCompass#0.0.1 No repository field.
npm WARN VinCompass#0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! imagemagick-native#1.9.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the imagemagick-native#1.9.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the imagemagick-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs imagemagick-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls imagemagick-native
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kspx/.npm/_logs/2017-05-15T05_30_58_940Z-debug.log
please guys give me the solution. how can I fix this problem?
i was try all the ubuntu commond. even I update node and npm to latest version. atill Getting the sam error.
As per documentation.
Install ImageMagick with headers before installing this module. Tested with ImageMagick 6.7.7 on CentOS 6 and Mac OS X Lion, Ubuntu 12.04 .
brew install imagemagick
or
sudo yum install ImageMagick-c++ ImageMagick-c++-devel
or
sudo apt-get install libmagick++-dev
Make sure you can find Magick++-config in your PATH. Packages on some newer distributions, such as Ubuntu 16.04, might be missing a link into /usr/bin. If that is the case, do this.
sudo ln -s `ls /usr/lib/\`uname -p\`-linux-gnu/ImageMagick-*/bin-Q16/Magick++-config | head -n 1` /usr/local/bin/
Then do :
npm install imagemagick-native

Unable to run npm command "npm install -g tty.js".

***Unable to run npm command "npm install -g tty.js".
Here is the error log I am getting :***
=D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\b
in\node-gyp.js" rebuild ) else (node "" rebuild )
pty.js#0.3.1 install D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\pty.js
node-gyp rebuild
D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\pty.js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-g
yp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Users\pjha\AppData\Roaming\npm\node_modules\tty.js\node_modules\pty.js
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
D:\Users\pjha\AppData\Roaming\npm
`-- (empty)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "tty.js"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pty.js#0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js#0.3.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pty.js
npm ERR! Or if that isn't available, you can get their info via:`enter code here`
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Praful\WorkSpaces\NodeJsWorkSpace\Test\npm-debug.log
See this issue on GitHub - #151: npm install pty.js` failed on Windows 10:
https://github.com/chjj/pty.js/issues/151
And this - #54: can't install on windows:
https://github.com/chjj/pty.js/issues/54
There are some solutions that people recommend. It's hard to tell which one will work for you but you should find some info in the comments to those issues.

error when install node modules ---common.gypi not found

when I run npm install , the node modules included in the package.json should be installed, however, there are following errors:
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
gyp: C:\Documents and Settings\Jicheng An\.node-gyp\0.10.5\common.gypi not found (cwd: c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\contextify) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (h:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "h:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm ERR! Error: ENOENT, lstat 'c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "h:\\Program Files\\nodejs\\node.exe" "h:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js
npm ERR! fstream_path c:\Documents and Settings\Jicheng An\csfv_cms_module\node_modules\csfv_misc_module\node_modules\email-templates\node_modules\juice\node_modules\jsdom\node_modules\cssstyle\lib\properties\borderBottomWidth.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack h:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! contextify#0.1.6 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the contextify#0.1.6 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "h:\\Program Files\\nodejs\\node.exe" "h:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! cwd c:\Documents and Settings\Jicheng An\csfv_cms_module
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm WARN engine mong.socket.io#0.9.0: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.5","npm":"1.2.18"})
npm http GET https://registry.npmjs.org/passport-openid
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/passport-oauth
npm http GET https://registry.npmjs.org/passport-oauth
I don't know what the common.gypi is and why the error happens.
can anyone help me to resolve this problem ?
I believe you module require compilation, most of the modules in npm have precompiled binaries for Win Mac Linux, but this one require compilation with node-gyp. https://github.com/TooTallNate/node-gyp
For Windows it will actually create .sln and .cxproj files for C source files of the module.
And it will do this using Python. After that it will run msbuild to build the solution.
You will need Visual Studio at least express in this case

Categories