一,npm升级自身
1,查看当前npm的版本:
root@lhdpc:/usr/local/source# npm -v 6.14.13
2,升级npm
root@lhdpc:/usr/local/source# npm install -g npm /usr/local/soft/node-v14.17.1-linux-x64/bin/npm -> /usr/local/soft/node-v14.17.1-linux-x64/lib/node_modules/npm/bin/npm-cli.js /usr/local/soft/node-v14.17.1-linux-x64/bin/npx -> /usr/local/soft/node-v14.17.1-linux-x64/lib/node_modules/npm/bin/npx-cli.js + npm@7.21.0 added 67 packages from 26 contributors, removed 246 packages and updated 189 packages in 91.916s
3,查看升级后的效果
root@lhdpc:/usr/local/source# npm -v 7.21.0
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com
二,npm升级@vue/cli
root@lhdpc:~# npm update -g @vue/cli
三,查看node的版本:
root@lhdpc:/usr/local/source# node -v v14.17.1
四,查看linux的版本
liuhongdi@lhdpc:~$ more /etc/os-release NAME="Ubuntu" VERSION="21.04 (Hirsute Hippo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 21.04" VERSION_ID="21.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=hirsute UBUNTU_CODENAME=hirsute