nodejs环境运维
一、nodejs环境运维
一)nodejs包管理工具
1、npm
查看源
npm get registry
临时修改
npm --registry https://registry.npmmirror.com install axios
持久使用
npm config set registry https://registry.npmmirror.com
还原
npm config set registry https://registry.npmjs.org
2、yarn
查看源
yarn config get registry
临时修改
yarn add axios --registry=https://registry.npmjs.org/
永久修改
yarn config set registry https://registry.npmmirror.com/
3、pnpm
查看源
pnpm get registry
临时修改
pnpm --registry https://registry.npmmirror.com install axios
持久使用
pnpm config set registry https://registry.npmmirror.com
还原
pnpm config set registry https://registry.npmjs.org
二)vue-cli如何升级到最新版本
1、卸载 vue-cli 的命令: npm uninstall -g @vue/cli 若上线的命令没卸载成功,加上--force 强制卸载 npm uninstall -g @vue/cli --force 2、再次安装最新版vue npm install -g @vue/cli