node-gyp build error windows x64

前端 未结 10 1529
情书的邮戳
情书的邮戳 2020-11-28 22:05

Here\'s what I\'ve done so far on my x64 OS:

  • Installed Python (v2.7 --specifically 2.7.6) and added it to the system path (C:\\Python27)
  • Installed MS
10条回答
  •  遥遥无期
    2020-11-28 22:29

    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. I don't know why setting python as env variable is not enough.

提交回复
热议问题