Bea*_*eat 40 node.js npm node-gyp visual-studio-2015
用Windows 10重新安装我的机器后,Visual Studio 2015我在安装我的git存储库时遇到了这个错误:
→ npm install在以下不同项目中失败:
...
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
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 10.0.10586
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:\Users\...\node_modules\buffertools
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Run Code Online (Sandbox Code Playgroud)
Bea*_*eat 61
此错误与之相关npm,node-gyp并且Visual Studio 2015已经修复node-gyp@3.4.0,但npm仍指向旧版本.当我解决方法时,我可以提出这个建议:
转到安装了npm的文件夹,例如:
C:\Program Files\nodejs\node_modules\npm
打开: package.json
删除node-gypin的条目bundleDependencies
凹凸版本号3.4.0为node-gyp中dependencies
做出npm i此目录中安装node-gyp@3.4.0来解决这个问题
有关GitHub问题可以在这里找到:
Log*_*orn 16
不涉及npm安装的替代解决方案是运行
SET CL=-DDELAYIMP_INSECURE_WRITABLE_HOOKS %CL%
Run Code Online (Sandbox Code Playgroud)
在跑步之前 npm install
| 归档时间: |
|
| 查看次数: |
10413 次 |
| 最近记录: |