admin管理员组文章数量:1344930
I have cloned a project from github and am trying to run it locally, it seems that the .angular-cli.json
file needs to be updated, I have ran through some of the tutorials here on how to do that and am faced with this error.
ng update @angular/cli --migrate-only --from=1.7.4 Updating karma configuration Updating configuration Removing old config file (.angular-cli.json) Writing config file (angular.json) Invalid JSON character: "" at 0:0.
I have cloned a project from github and am trying to run it locally, it seems that the .angular-cli.json
file needs to be updated, I have ran through some of the tutorials here on how to do that and am faced with this error.
Share Improve this question edited Aug 10, 2018 at 1:05 georgeawg 49k13 gold badges77 silver badges98 bronze badges asked Aug 9, 2018 at 17:42 RussellRussell 632 silver badges9 bronze badgesng update @angular/cli --migrate-only --from=1.7.4 Updating karma configuration Updating configuration Removing old config file (.angular-cli.json) Writing config file (angular.json) Invalid JSON character: "" at 0:0.
2 Answers
Reset to default 9It seems that you are trying to upgrade angular core version for your cloned project. Any way this error happens due to json files wrong encoding so you must ensure that all your json files like (angular-cli.json, tslint.json and tsconfig.json) are UTF-8 encoded not UTF With BOM. You can change encoding of these files using VSCode or notepad++ so running ng update @angular/cli --migrate-only --from=1.7.4 should wrong smoothly without any problems
Fix this issue with visual studio code, you can change the encoding with Visual studio code see the steps below
本文标签:
版权声明:本文标题:javascript - Invalid JSON character: "" at 0:0. when running command "ng update @angularcli --migrate 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743754724a2533298.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论