【ERROR】angular版本问题&compiler_cli_1.readConfiguration is not a function

在尝试启动Angular项目时遇到'compiler_cli_1.readConfiguration is not a function'的错误。问题一解决方法是使用'ng update @angular/cli --migrate-only --from=1.7.3'命令。尽管版本显示为7.3.8,但更新后解决了问题,但随后出现新错误。问题二中,项目报错一片,通过进一步彻底更新版本,问题得到解决,最终成功运行网页示例。
摘要由CSDN通过智能技术生成

问题一、angular版本问题

cielo@cielo-ThinkPad-E550:~/cprogrames/test-bna/angular-test$ ng serve
The serve command requires to be run in an Angular project, but a project definition could not be found.

用npm start也是同样的问题。

cielo@cielo-ThinkPad-E550:~/cprogrames/test-bna/angular-test$ npm start

> angular-test@0.0.1 start /home/cielo/cprogrames/test-bna/angular-test
> ng serve --proxy-config proxy.conf.js --host 0.0.0.0

The serve command requires to be run in an Angular project, but a project definition could not be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-test@0.0.1 start: `ng serve --proxy-config proxy.conf.js --host 0.0.0.0`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-test@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/cielo/.npm/_logs/2019-04-12T13_09_57_716Z-debug.log

该问题解决方案:

ng update @angular/cli --migrate-only --from=1.7.3
https://stackoverflow.com/questions/53096996/angular-cli-error-the-serve-command-requires-to-be-run-in-an-angular-project-b


作者:低调奋进
来源:CSDN
原文:https://blog.csdn.net/zwbHUST/article/details/89024467
版权声明:本文为博主原创文章,转载请附上博文链接!

其实我也在starkoverflow看到了。

我的版本明明是7.3.8,但是–from=【】这块写7.3.8没有用。
不过运行了之后好了似乎。报了新的错误

问题二

红一片,我的心情不知道该如何描述。

cielo@cielo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值