node-gyp is not recognized as an internal or external command

Created on 12 May 2017  路  1Comment  路  Source: nodejs/node-gyp

After running: npm install --global --production windows-build-tools
I try to run the following command: node-gyp --python C:\Python27\python27 and then get the following message:
'node-gyp' is not recognized as an internal or external command,
operable program or batch file.

Most helpful comment

Hello @dauledk,
You have two ways to trigger node-gyp:

  1. If the addon is ready (i.e. has a binding.gyp file) you can just run npm i
  2. If you want to explicitly run node-gyp you'll need to install it as a global module with npm i -g node-gyp

note: https://github.com/nodejs/node-gyp/issues/1195#issuecomment-300888406 - npm has it's own version locked copy of the node-gyp module.

note2: if your python is in your path you don't need the --python C:\Python27\python27 flag

>All comments

Hello @dauledk,
You have two ways to trigger node-gyp:

  1. If the addon is ready (i.e. has a binding.gyp file) you can just run npm i
  2. If you want to explicitly run node-gyp you'll need to install it as a global module with npm i -g node-gyp

note: https://github.com/nodejs/node-gyp/issues/1195#issuecomment-300888406 - npm has it's own version locked copy of the node-gyp module.

note2: if your python is in your path you don't need the --python C:\Python27\python27 flag

Was this page helpful?
0 / 5 - 0 ratings