Angular Cli 严格的 NPM 版本?

标签 angular npm angular-cli package.json

是否可以设置 AngularCli 以便生成具有严格版本package.json

不是:

"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",

但是

"@angular/common": "6.0.3",
"@angular/compiler": "6.0.3",
"@angular/core": "6.0.3",

我试过了

npm config set save-exact true 

但是没有用。

最佳答案

我相信你可以... 我认为一些相关 Material 是:

https://www.npmjs.com/package/strict-version

你能发布为什么 npm config set save-exact true 失败了吗? 也许它没有安装。

你也可以试试.... npm install --save --save-exact my-module@my-specific-version

此外,如果您只想对特定包执行此操作,添加 --save-exact 到命令行可能会有用。 例如,npm install --save --save-exact somepackage

关于Angular Cli 严格的 NPM 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50771920/

相关文章:

android - ionic cordova构建Android失败

angular - 使用angular-cli构建其他项目可以安装的库

angular - 如何在 angular cli 6+ 中添加组件默认值

node.js - 具有实时和 WebSockets 的 Angular2 + Laravel

html - 如何在 Angular 中打印一条 MySqL 记录的数据

node.js - npm 安装 : unable to install dependencies in Windows 10

node.js - npm install <module> 持续错误? ( Node gyp 构建?)

typescript - 在 Angular2 项目中使用 TweenMax

javascript - 在数组中查找重复对象的有效方法

Angular 更新包 CSS-WHAT