V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chimingphang
V2EX  ›  Node.js

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

  •  
  •   chimingphang · 2016-03-15 15:00:07 +08:00 · 4067 次点击
    这是一个创建于 2965 天前的主题,其中的信息可能已经有所发展或是发生改变。

    ➜ 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 条回复    2016-03-15 15:53:40 +08:00
    ljcarsenal
        1
    ljcarsenal  
       2016-03-15 15:34:22 +08:00
    看看你 npm 的路径是不是 /Users/zhiming/.node/bin/npm 。。。 unix 平台下 好像是 which npm 的命令
    chimingphang
        2
    chimingphang  
    OP
       2016-03-15 15:38:05 +08:00
    ➜ uitoolkit which -a npm
    /usr/local/bin/npm
    Strikeactor
        3
    Strikeactor  
       2016-03-15 15:44:50 +08:00   ❤️ 1
    chimingphang
        4
    chimingphang  
    OP
       2016-03-15 15:53:40 +08:00
    @Strikeactor 谢谢大虾
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5385 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 05:49 · PVG 13:49 · LAX 22:49 · JFK 01:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.