npm命令
npm/yarn config set registry https://registry.npm.taobao.org 设置淘宝镜像
npm/yarn config get registry 查看当前镜像
npm --registry https://registry.npm.taobao.org install express 临时使用
npm outdated 查询依赖版本是否是最新
npm list name 查看服务器上依赖包的版本信息
npm view name 显示服务器上依赖包的最新版本信息
npm ls name 查看本地安装包的版本信息
npm cache verify 验证缓存
npm cache clean --force 清理缓存
node-sass安装失败解决方法 npm/yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
nrm命令
nrm 淘宝镜像管理工具 需要全局安装
nrm ls 查看所有可用镜像
nrm use taobao 使用某种镜像
n命令
n 不带参数查看当前安装的nodejs版本
n --help 查看帮助
n ls 查看node可用版本
n rm 8.0.0 删除某个版本
n use 8.0.0 server.js 指定运行版本
n lts Error: sudo required解决方法 运行 sudo n lts
nvm命令
nvm list 查看已安装node版本
nvm use [version] [arch] 切换制定的node版本和位数
p.p1 { margin: 0; font: 12px ".PingFang SC"; color: rgba(69, 69, 69, 1) }
p.p2 { margin: 0; font: 12px "Helvetica Neue"; color: rgba(69, 69, 69, 1) }
span.s1 { font: 12px "Helvetica Neue" }
span.s2 { font: 12px ".PingFang SC" }
p.p1 { margin: 0 0 10px; font: 14px "PingFang SC"; color: rgba(0, 0, 0, 1); -webkit-text-stroke: #000000 }
span.s1 { font-kerning: none }
p.p1 { margin: 0; font: 11px Menlo; color: rgba(195, 55, 32, 1); background-color: rgba(255, 255, 255, 1) }
span.s1 { font-variant-ligatures: no-common-ligatures }