chimingphang
V2EX  ›  Node.js

为啥装了最新的 NPM 还是显示旧的版本

  •  
  •   chimingphang · Mar 15, 2016 · 4781 views
    This topic created in 3777 days ago, the information mentioned may be changed or developed.

    ➜ uitoolkit sudo npm install npm@latest -g
    /Users/zhiming/.node/bin/npm -> /Users/zhiming/.node/lib/node_modules/npm/bin/npm-cli.js
    [email protected] /Users/zhiming/.node/lib/node_modules/npm
    ➜ uitoolkit npm -v
    2.14.20

    为啥装了最新的 NPM 还是显示旧的版本

    4 replies    2016-03-15 15:53:40 +08:00
    ljcarsenal
        1
    ljcarsenal  
       Mar 15, 2016
    看看你 npm 的路径是不是 /Users/zhiming/.node/bin/npm 。。。 unix 平台下 好像是 which npm 的命令
    chimingphang
        2
    chimingphang  
    OP
       Mar 15, 2016
    ➜ uitoolkit which -a npm
    /usr/local/bin/npm
    Strikeactor
        3
    Strikeactor  
       Mar 15, 2016   ❤️ 1
    chimingphang
        4
    chimingphang  
    OP
       Mar 15, 2016
    @Strikeactor 谢谢大虾
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1378 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    ♥ Do have faith in what you're doing.