vue create项目报错?if not defined npm_config_node_gyp请问怎么解决?
Vue CLI v4.5.10
? Creating project in D:myprojectvuevue-x.
? Initializing git repository...
?? Installing CLI plugins. This might take a while..
.
> fibers@4.0.3 install D:myprojectvuevue-x
ode_modulesfibers
> node build.js || nodejs build.js
D:myprojectvuevue-x
ode_modulesfibers>if not defined npm_config_node_gyp (node "D:software
ode_modules
pm
ode_modules
pm-lifecycle
ode-gyp-bin\....
ode_modules
ode-gypin
ode-gyp.js" rebuild --release ) else (node "node C:UsersmeAppDataRoaming
pm
ode_modules
ode-gypin
ode-gyp.js" rebuild --release )
internal/modules/cjs/loader.js:1033
throw err;
^
Error: Cannot find module 'D:myprojectvuevue-x
ode_modulesfibers
ode C:UsersmeAppDataRoaming
pm
ode_modules
ode-gypin
ode-gyp.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
'nodejs' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers@4.0.3 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers@4.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersadminAppDataRoaming
pm-cache\_logs2021-01-15T11_27_05_219Z-debug.log
ERROR command failed: npm install --loglevel error
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…