node-gyp Err:找不到模块 - windows 10

时间:2018-02-23 07:24:31

标签: node.js node-gyp

我全局安装了node-gyp,并将其保存在C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp

当我在命令提示符下运行$ node-gyp时,我收到此错误

if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"  )  else (node ""  )
module.js:540
    throw err;
    ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\node_modules\node_modules\node-gyp\bin\node-gyp.js'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

`

这里的关键部分是C:\Program Files\nodejs\node_modules\npm\node_modules\node_modules\node-gyp\bin\node-gyp.js 什么时候应该看C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js

Python版Python 2.7.14

Windows Build工具也已安装。

节点版本v8.9.4

用户变量:

User Variables

System Variables

0 个答案:

没有答案