node-gyp troubles with installation

流过昼夜 提交于 2019-11-30 21:07:29

try npm install –msvs_version=2012. This command will ask NPM to use visual studio 2012 to build.

http://www.kevgriffin.com/specifying-visual-studio-version-in-npm-installs/

After spending a while to get this to work (for me accepted answer didn't work, for me it's just half solution) i did following:

  1. Sadly, you must have visual studio (i installed express edition 2013 for DESKTOP)
  2. Installed python 2.7.3 (you don't have to set any environment variables)
  3. Run cmd as administrator and go to you project root (where is you package.json file)
  4. First run: npm config set python C:\Python27\python.exe
  5. Then: npm install -msvs_version=2013

The trick is in command npm config set python ...path_to_python_exe... which will be provided by npm to dependency which needs python i guess.

Got Windows 7 64 bit.

Did all the above but I still got the error which was mentioned.

What worked for me was:

  1. Uninstall Microsoft .NET Frameworks (I got more than one version)
  2. Open regedit and navigating to: hkey_local_machine/software/Microsoft/MSBuild
  3. Remove all .net versions (I got there 2 and 3.5 sub directories)
  4. If You have OS 64 Bit repeat steps 2 & 3 for %WinDir%\SysWOW64\regedit.exe
  5. Reinstall Microsoft .NET Framework

Hope it will spare some time for you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!