【问题标题】:can't install "npm install -g yo" global only local.无法在本地安装“npm install -g yo”全局。
【发布时间】:2018-12-02 05:09:04
【问题描述】:

我正在尝试安装 jhipster 但我无法安装

npm install -g yo

我得到了这个

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
✖ yo version

Your yo version is outdated.

Upgrade to the latest version by running:
npm install -g yo@latest


Found potential issues on your machine :(
+ yo@2.0.5

但是如果我跑了

 npm install yo

我没有遇到任何问题

我正在使用 npm -v 6.4.1 节点-v v10.13.0 和 macOS Mojave 10.14

【问题讨论】:

    标签: node.js macos npm yo


    【解决方案1】:

    我尝试不同的跑步方式

    yarn global add yo
    

    然后

    export PATH="$PATH:$(yarn global bin):$HOME/.config/yarn/global/node_modules/.bin"
    

    yo jhipster
    

    现在 jhipster 终于开始工作了?

    【讨论】:

      猜你喜欢
      • 2014-01-19
      • 2013-11-19
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 2022-08-03
      • 2017-10-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多