我试图安装sharp模块,这需要:c编译器 - 我下载了Visual Studio 2017和visual c build tools 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! node -v v8.5.0
-
gyp ERR! node-gyp -v v3.6.2
-
gyp ERR!不好
-
npm WARN错误:EPERM:不允许操作,取消链接
-
'C:\Users\MyUsername\AppData\Roaming\npm\node_modules\sharp\node_modu es\color-name\package.json'
-
npm WARN {错误:EPERM:不允许操作,取消链接'C:\Users\MyUsername\AppData\Roaming\npm\node_modules\sharp\node_m dules\color-name\package.json'
-
npm WARN堆栈:'Error: EPERM: operation not permitted, unlink ' C:\ Users \ MyUsername \ AppData \ Roaming \ npm \ node_module \ sharp \ node_modules \ color-name \ package.json '',
-
npm WARN errno:-4048,
-
npm WARN代码:'EPERM',
-
npm WARN系统调用:'unlink',
-
npm WARN路径:
-
'C:\Users\MyUsername\AppData\Roaming\npm\node_modules\sharp\node_modules\color-name\package.json'}
-
npm ERR!代码ELIFECYCLE npm ERR!错误1 npm ERR! sharp@0.18.3安装:
node-gyp rebuild
npm ERR!退出状态1
如果重要 - 我是Windows用户