Angular项目升级错误:Could not find @angular-devkit/build-angular:dev-server

项目从Angular8升级到angualr9出现错误:Could not find @angular-devkit/build-angular:dev-server

错误详情:An unhandled exception occurred: Could not find the implementation for builder @angular-devkit/build-angular:dev-server.

错误原因:本地的angular-cli 和 @angular-devkit/build-angular 不匹配。如果强制升级本地的angular-cli 会导致这个问题。

解决方案:升级到最新库@angular-devkit/build-angular

执行名令:npm i --save-dev @angular-devkit/build-angular@latest

 

你可能感兴趣的:(Angular,angular,前端)