--save-exact
时间: 2023-09-30 22:02:15 浏览: 60
The `--save-exact` flag is used in npm to save the exact version number of a package in the package.json file. By default, when you install a package using npm, it saves a version range in the package.json file. This means that the package manager can install any version of the package that falls within that range.
However, if you use the `--save-exact` flag when installing a package, npm will save the exact version number of the package in the package.json file. This means that the package manager will always install that specific version of the package, even if a newer version is available.
Using `--save-exact` can be useful when you want to ensure that your application always uses a specific version of a package, without having to worry about compatibility issues that may arise when using a newer version.