npm - 如何更新全局安装的 npm 包
问题描述
命令: npm outdated -g
输出:
Package Current Wanted Latest Location
@angular/cli 1.3.1 1.7.4 7.0.5
create-react-app 1.5.2 1.5.2 2.1.1
eslint 5.6.0 5.9.0 5.9.0
expo-cli 2.2.0 2.3.8 2.3.8
gulp-cli 1.4.0 1.4.0 2.0.1
how-to-npm 2.5.0 2.5.1 2.5.1
mocha 3.5.0 3.5.3 5.2.0
nodemon 1.18.3 1.18.6 1.18.6
now 11.4.6 11.5.2 12.0.1
serve 10.0.1 10.0.2 10.0.2
typescript 2.4.2 2.9.2 3.1.6
yarn 1.9.4 1.12.3 1.12.3
如何在 npm 中更新这些过时的包?
解决方案
如果要更新所有全局包
npm update -g
如果要更新特定的全局包
npm update -g <package_name>
推荐阅读
- entity-framework - 使用 EF6,如何全局设置事务隔离级别等连接属性?
- python-3.x - 无法使用 python boto3 模块连接到 nexrad aws s3 存储桶
- laravel - Laravel:使用 slug 代替 id 的优缺点
- mongodb - 启动 KeystoneJS 应用程序时出现 GraphQL 错误
- c# - C# Excel COM 插件程序集绑定重定向?
- r - ggplot:如何将组平均值作为一条线添加到R中的分组条形图中?
- java - 如果在开始时单击按钮,但如果在 Seekbar 移动后单击,则应用程序崩溃崩溃
- c# - 为什么不能在 ajax 中使用 beginform?
- reactjs - Axios 请求未在 componentDidMount 上触发
- reactjs - Gatsby 构建在页面重新加载后不采用反应引导大小前缀