节点GYP。 MSBuild.exe失败,退出代码:1
我试图安装尖锐的模块,这需要:C ++编译器 – 我下载了Visual Studio 2017和Visual C ++构build工具node-gyp – 它已成功安装
但运行'npm install -g sharp'我有很多错误
- gyp ERR! 堆栈错误:
E:\VS\MSBuild\15.0\Bin\MSBuild.exe
失败,退出代码:1 - gyp ERR! 在ChildProcess.onExit(C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ node-gyp \ li \ build.js:258:23)
- gyp ERR! 在emitTwo(events.js:125:13)
- gyp ERR! 在ChildProcess.emit(events.js:213:7)
- gyp ERR! 在Process.ChildProcess._handle.onexit(internal / child_process.js:200:12)
- gyp ERR! 系统Windows_NT 10.0.15063
- gyp ERR! 命令“C:\ Program Files \ nodejs \ node.exe”
- “C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ npm \ nod _modules \ node-gyp \ bin \ node-gyp.js”“rebuild”
- gyp ERR! cwd C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ sharp
- gyp ERR! 节点-v v8.5.0
- gyp ERR! node-gyp -v v3.6.2
- gyp ERR! 不好
- npm警告错误:EPERM:操作不允许,取消链接
- 'C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ sharp \ node_modu es \ color-name \ package.json'
- npm WARN {Error:EPERM:operation not permitted,unlink'C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ sharp \ node_m dules \ color-name \ package.json'
- npm WARN stack:'Error:EPERM:operation not permitted,unlink \'C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_module \ sharp \ node_modules \ color-name \ package.json \'',
- npm警告错误:-4048,
- npm警告代码:'EPERM',
- npm WARN系统调用:'unlink',
- npm WARNpath:
- 'C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_modules \ sharp \ node_modules \ color-name \ package.json'}
- npm ERR! 代码ELIFECYCLE npm ERR! errno 1 npm ERR! sharp@0.18.3安装:
node-gyp rebuild
gypnode-gyp rebuild
npm ERR! 退出状态1
我试图解决这个错误,但我不能。 如果重要 – 我是Windows用户
我希望你能帮我解决这个错误