siwadiya
V2EX  ›  Apple

m1 mac node 安装的全局包找不到命令

  •  
  •   siwadiya · Apr 21, 2021 · 3113 views
    This topic created in 1874 days ago, the information mentioned may be changed or developed.

    使用 nvm 安装的 node 版本 v15.14.0

    npm install --global yarn

    yarn global add @vue/cli

    执行 vue 时发现 vue command not found 以及安装的其他全局包也都是这样。

    发现用 npm install --global package 就可以用

    2 replies    2021-04-21 22:51:04 +08:00
    Vegetable
        1
    Vegetable  
       Apr 21, 2021   ❤️ 2
    yarn 的 bin 目录加到 path 就好了
    yarn bin 可以查看目录地址
    siwadiya
        2
    siwadiya  
    OP
       Apr 21, 2021
    @Vegetable 感谢,已解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2990 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 14:34 · PVG 22:34 · LAX 07:34 · JFK 10:34
    ♥ Do have faith in what you're doing.