Maison > Questions et réponses > le corps du texte
安装yoman时命令行这样提示:
C:\Users\张洋\WebstormProjects\react_gallary\react_gallary [master +12 ~1 -0 !]> npm install -g yo
npm WARN deprecated npmconf@2.1.2: **this package has been reintegrated into npm and is now out of date with respect to npm**
\
> spawn-sync@1.0.15 postinstall C:\Users\张洋\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\node_modules\inquirer\node_modules\external-editor\node_modules\spawn-sync
> node postinstall
> spawn-sync@1.0.15 postinstall C:\Users\张洋\AppData\Roaming\npm\node_modules\yo\node_modules\tabtab\node_modules\inquirer\node_modules\external-editor\node_modules\spawn-sync
> node postinstall
C:\Users\张洋\AppData\Roaming\npm\yo-complete -> C:\Users\张洋\AppData\Roaming\npm\node_modules\yo\lib\completion\index.js
C:\Users\张洋\AppData\Roaming\npm\yo -> C:\Users\张洋\AppData\Roaming\npm\node_modules\yo\lib\cli.js
> yo@1.8.5 postinstall C:\Users\张洋\AppData\Roaming\npm\node_modules\yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ Node.js version
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory
**× npm version**
这里图示npm版本问题,我已经升级到最新版本了,
运行yo -v是这样的
C:\Users\张洋\WebstormProjects\react_gallary\react_gallary [master +12 ~1 -0 !]> yo -v
? 'Allo ZhangYang! What would you like to do? (Use arrow keys)
Run a generator
> Webapp
React Webpack
──────────────
Update your generators
Install a generator
Find some help
Get me out of here!
──────────────
为什么不显示版本号呢?之前安装nmp工具的时候有时候是全局安装有时候不是,之前查看yo文件夹,发现两个地方都有,我就把两个地方的yo文件夹都删了,然后重新全局安装,还是上面的问题?怎么办 ?大神?