安装

使用 fnm管理 Node,先安装 fnm

  1. curl -fsSL https://fnm.vercel.app/install | bash
  • 国内镜像源(fish)

    set FNM_NODE_DIST_MIRROR https://mirrors.bfsu.edu.cn/nodejs-release/
    
  • 更新 fnm

    curl -fsSL https://fnm.vercel.app/install | bash --skip-shell
    
  • 安装 Node.js LTS

    fnm install --lts
    
  • 显示所有版本

    fnm list-remote
    
  • 显示当前版本

    fnm current
    

    npm 镜像源

    npm config set registry https://registry.npmmirror.com