node.js - yoman安装有问题
巴扎黑
巴扎黑 2017-04-17 15:24:48
[Node.js讨论组]

安装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文件夹都删了,然后重新全局安装,还是上面的问题?怎么办 ?大神?

巴扎黑
巴扎黑

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号