+-
vue create项目报错?if not defined npm_config_node_gyp

vue create项目报错?if not defined npm_config_node_gyp请问怎么解决?

Vue CLI v4.5.10
✨  Creating project in D:\myproject\vue\vue-x.
�  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while..
.


> [email protected] install D:\myproject\vue\vue-x\node_modules\fibers
> node build.js || nodejs build.js


D:\myproject\vue\vue-x\node_modules\fibers>if not defined npm_config_node_gyp (node "D:\software\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )  else (node "node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'D:\myproject\vue\vue-x\node_modules\fibers\node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-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! [email protected] install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-01-15T11_27_05_219Z-debug.log
 ERROR  command failed: npm install --loglevel error