美文网首页
linux系统 node版本管理

linux系统 node版本管理

作者: squidbrother | 来源:发表于2020-01-18 01:05 被阅读0次
    概述

    交互式地管理您的Node.js版本
    有则切换,没有则下载
    注:在Windows系统不支持n

    安装

    npm install n -g

    指令
    指令名 含义
    n Display downloaded node versions and install selection
    n latest Install the latest node release (downloading if necessary)
    n lts Install the latest LTS node release (downloading if necessary)
    n <version> Install node <version> (downloading if necessary)
    n run <version> [args ...] Execute downloaded node <version> with [args ...]
    n which <version> Output path for downloaded node <version>
    n exec <vers> <cmd> [args...] Execute command with modified PATH, so downloaded node <version> and npm first
    n rm <version ...> Remove the given downloaded version(s)
    n prune Remove all downloaded versions except the installed version
    n --latest Output the latest node version available
    n --lts Output the latest LTS node version available
    n ls Output downloaded versions
    n ls-remote [version] Output matching versions available for download
    n uninstall Remove the installed node and npm

    【注】:
    安装完毕后,需要重启linux服务器,即可看到nodejs版本变化

    相关文章

      网友评论

          本文标题:linux系统 node版本管理

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