简体   繁体   中英

how to solve npm install command

i want to learn node js and my boss send me this project but its show error. how to solve this type of problem when i enter npm install this command is show below error...i already installed visual studio 2015

gyp ERR! stack operable program or batch file.
gyp ERR! stack
gyp ERR! stack Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:134:25
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:213:5)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
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 D:\Addi\HeavyMetalServer\node_modules\iltorb
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

Your npm install command fails during installing node-gyp module. node-gyp module gives a lot of problems when installing on windows. You can run this command to install its dependencies first - npm install --global --production windows-build-tools . This command is given on their github page .

For windows users:

Try running the npm install command from Powershell with administrative rights

This is one of the many workarounds

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM