Node.JS – 在使用npm install时,与Node-gyp和/或ELIFECYCLE错误

我试图安装npm库“夏普”,但是当我尝试运行npm安装命令,我得到这在我的控制台:

> sharp@0.18.2 install C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp > node-gyp rebuild C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Users\apixe\AppData\Roaming\npm\node_modules\npm\bin\node-gyp- bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: Cannot find module 'minimatch' gyp ERR! stack at Function.Module._resolveFilename (module.js:485:15) gyp ERR! stack at Function.Module._load (module.js:437:25) gyp ERR! stack at Module.require (module.js:513:17) gyp ERR! stack at require (internal/module.js:11:18) gyp ERR! stack at Object.<anonymous> (C:\Users\apixe\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:23:17) gyp ERR! stack at Module._compile (module.js:569:30) gyp ERR! stack at Object.Module._extensions..js (module.js:580:10) gyp ERR! stack at Module.load (module.js:503:32) gyp ERR! stack at tryModuleLoad (module.js:466:12) gyp ERR! stack at Function.Module._load (module.js:458:3) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\apixe\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\apixe\Documents\GS Bot\Bots\Child\node_modules\sharp gyp ERR! node -v v8.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! This is a bug in `node-gyp`. gyp ERR! Try to update node-gyp and file an Issue if it does not help: gyp ERR! <https://github.com/nodejs/node-gyp/issues> npm WARN discord.js@11.1.0 requires a peer of bufferutil@^3.0.0 but none was installed. npm WARN discord.js@11.1.0 requires a peer of erlpack@hammerandchisel/erlpack but none was installed. npm WARN discord.js@11.1.0 requires a peer of node-opus@^0.2.5 but none was installed. npm WARN discord.js@11.1.0 requires a peer of opusscript@^0.0.3 but none was installed. npm WARN discord.js@11.1.0 requires a peer of sodium@^2.0.1 but none was installed. npm WARN discord.js@11.1.0 requires a peer of libsodium-wrappers@^0.5.1 but none was installed. npm WARN discord.js@11.1.0 requires a peer of uws@^0.14.1 but none was installed. npm WARN gsbot@1.0.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 7 npm ERR! sharp@0.18.2 install: `node-gyp rebuild` npm ERR! Exit status 7 npm ERR! npm ERR! Failed at the sharp@0.18.2 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! C:\Users\apixe\AppData\Roaming\npm-cache\_logs\2017-09-02T23_37_17_871Z-debug.log 

我花了数小时的研究试图找出这个,但没有运气。 如果有人能帮忙,我会很感激。