我正在使用基于 Debian/Ubuntu 的发行版(特别是 AWS Ubuntu 16.04)并尝试通过 apt-get
安装 NPM .
我的 Angular 2 应用程序需要高于 3.9.x 的 NPM 版本,但使用 sudo apt-get install npm
安装的默认版本是 3.5.2在 AWS Ubuntu 16.04 上。我正在尝试更新 NPM,但它没有从 3.5.2 升级到 4.6.1(最新)。
如何安装/更新 NPM 以便获得最新版本?
最佳答案
在您的服务器 bash 上输入“hash -r”。
然后再次检查你的'npm -v'
关于node.js - 为什么 Debian/Ubuntu 上只能使用过时的 NPM 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44095985/