[英]Migrating from Angular5 to Angular6, angular.json is not updated
[英]Angular upgrade from 5 to 6 - Angular.json not created
我正在按照官方指南将 angular 应用程序升级到版本 10,目前正在尝试根据更新升级到 CLI 版本6。angular.ZF98ED07A4D5F50F7DE1410D905F1477F
确保您使用的是 Node 8 或更高版本 在本地更新您的 Angular CLI,并通过运行以下命令将配置迁移到新的 angular.json 格式:
npm install @angular/cli@6
ng update @angular/cli@6
我已经运行了以下代码,但我仍然可以看到.angular-cli.json 文件而不是 angular.json 文件。
以下是更新到版本 6 的当前 cli 版本,除了与对等依赖相关的几个警告在更新 CLI 时没有出现任何错误。
这成功了! @Andrew Allen but the second most voted answer worked in my case => you can automatically update your existing angular-cli.json file to angular.json file by using the below command provided that you are on v6.xx or greater of angular cli命令行工具。
**ng update @angular/cli --from=1.7.4 --migrate-only**
在上面的命令中,1.7.4 是您之前使用的 cli 版本。 --migrate-only 标志确保它只会执行迁移但不会更新已安装的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.