← 返回命令列表

Linux command

npm-update 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Update all packages

npm update

Update specific package

npm update [package-name]

Update global packages

npm update -g

Update to latest (beyond semver)

npm update [package] --latest

Dry run update

npm update --dry-run

说明

npm update updates packages to latest versions within semver range specified in package.json. Updates package-lock.json. Use npm outdated first to see available updates.

参数

-g, --global
Update global packages.
--save
Update package.json.
--dry-run
Preview updates.

FAQ

What is the npm-update command used for?

npm update updates packages to latest versions within semver range specified in package.json. Updates package-lock.json. Use npm outdated first to see available updates.

How do I run a basic npm-update example?

Run `npm update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -g, --global do in npm-update?

Update global packages.