if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) module.js:538 throw err; ^ Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3
现在npm run i 没问题了,node-gyp 都正常了,在npn run start 的时候好像是报了个插件的错误?
Module build failed: Error: Plugin 0 specified in "base" provided an invalid property of "default"
plugin.js
文件的内容是:
![]() | 1 mikicomo OP win10 node v8.9 执行项目的 npm run i 的时候,每次都在 Node-gyp 这里挂了,python 2.7 和 Visual C++ Build Tools 都装好了 不明白为啥会这样,google 上貌似也没好的解决方案 |
2 CDL 2017-12-14 21:23:27 +08:00 挂代理 or 管理员权限安装 |
![]() | 3 FrankFang128 2017-12-14 21:34:52 +08:00 or 换 Linux / macOS |
![]() | 4 king6cong 2017-12-14 21:55:40 +08:00 You need this: npm install --global --production windows-build-tools https://github.com/felixrieseberg/windows-build-tools |
![]() | 5 mikicoo OP |
![]() | 6 LemonFlower 2017-12-14 22:30:54 +08:00 via iPhone 卸载 Node 重装最新版 |
![]() | 7 learnshare 2017-12-14 22:32:30 +08:00 |
8 victor97 2017-12-14 22:36:37 +08:00 via Android 换用 yarn |
![]() | 9 mikicomo OP |
![]() | 10 mikicomo OP @learnshare #7 @victor97 #8 @king6cong #4 C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js 这个目录下,node-gyp 这个目录不存在的,是为什么呢? |
11 orangeChu 2018-12-23 01:17:22 +08:00 执行 `set npm_config_node_gyp=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js` 设置一下 node-gyp.js 路径就行了。 |