Node JS npm install build error“require('nan')”

时间:2016-03-04 03:28:45

标签: node.js npm npm-install

我在运行

时遇到此错误
npm install --msvs_version=2015

以下是我遇到的错误

C:\Git\companynodemodule\node_modules\monitor-company\node_modules\frontier-client\node_modules\ws\node_modules\utf-8-validate> 
if not defined npm_config_node_gyp 
(node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  
else (node  rebuild )
The system cannot find the path specified.
gyp: Call to 'node -e "require('nan')"' returned exit status 1. 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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355: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:200:12)
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 C:\Git\companynodemodule\node_modules\monitor-company\node_modules\frontier-client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v4.3.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.1.0
npm WARN optional dep failed, continuing utf-8-validate@1.1.0

> v8-profiler@5.3.2 install C:\Git\companynodemodule\node_modules\monitor-company\node_modules\v8-profiler
> node-pre-gyp install --fallback-to-build

[v8-profiler] Success: "C:\Git\companynodemodule\node_modules\monitor-company\node_modules\v8-profiler\build\profiler\v5.3.2\node-v46-win32-x64\profiler.node" is installed via remote
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" "--msvs_version=2015"
npm ERR! node v4.3.1
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE

npm ERR! libxmljs@0.17.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs@0.17.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the libxmljs 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 libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Git\companynodemodule\npm-debug.log

这是可安装的distributables /软件 Installed Programs

这是$ npm配置列表     ; cli configs     user-agent =“npm / 2.14.12 node / v4.3.1 win32 x64”

; userconfig C:\Users\user\.npmrc
registry = "http://npm.company.com/"

; globalconfig C:\Users\user\AppData\Roaming\npm\etc\npmrc
msvs_version = "2010"
registry = "http://npm.company.com/"

; builtin config undefined
prefix = "C:\\Users\\user\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Git\companynodemodule
; HOME = C:\Users\user
; 'npm config ls -l' to show all defaults.
  • 我不确定解决方案是什么,其他系统正在使用相同的构建/分支,并且它们不会遇到此错误。
  • 第一次在这台机器上安装npm。

我已经阅读了很多现有的问题,但似乎都没有帮助。

提前谢谢。

0 个答案:

没有答案