root@lhdpc:/usr/local/source# npm -v 6.14.132,升级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.916s3,查看升级后的效果
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
root@lhdpc:~# npm update -g @vue/cli
root@lhdpc:/usr/local/source# node -v v14.17.1
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