美文网首页
【Basic】node和npm更新

【Basic】node和npm更新

作者: rainyforest | 来源:发表于2020-02-19 07:19 被阅读0次

    检查node版本:
    node -v(--version)
    检查npm版本:
    npm -v(--version)
    多数命令行工具同时支持长短的参数,比如 -v和--version,-h和--help。
    更新npm到最新版:
    npm install npm@latest -g
    更新node:
    n module.
    sudo npm cache clean -f (清除npm缓存)
    sudo npm install -g n
    安装:
    sudo n stable(稳定版)

    sudo n latest(最新版)
    更新后重新检查版本,版本没变? 关闭shell再开或者更新 source /.bashrc即可

    相关文章

      网友评论

          本文标题:【Basic】node和npm更新

          本文链接:https://www.haomeiwen.com/subject/zhyofhtx.html