英文:
npm install not installing '@angular-devkit/build-angular:dev-server"
问题
在一个MEAN课程项目中,我无法运行它,因为我遇到以下错误:
$ npm run start
> mean-course@0.0.0 start
> ng serve
可能未安装Node包。尝试使用 'npm install' 进行安装。
错误:无法找到 '@angular-devkit/build-angular:dev-server' 构建程序的节点包。
所以我进入package.json文件,在“devDependencies”下添加以下行:
"@angular-devkit/build-angular:dev-server": "15.1.6",
然后我尝试运行npm run start,但我仍然收到以下错误,指出依赖项仍未安装:
> mean-course@0.0.0 start
> ng serve
可能未安装Node包。尝试使用 'npm install' 进行安装。
错误:无法找到 '@angular-devkit/build-angular:dev-server' 构建程序的节点包。
有人遇到相同的问题或知道解决方法吗?任何帮助将不胜感激,谢谢!
英文:
On a MEAN course project I cannot run it because I am getting the below error:
$ npm run start
> mean-course@0.0.0 start
> ng serve
Node packages may not be installed. Try installing with 'npm install'.
Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package.
So I go into the package.json file and under "devDependencies" add the line:
"@angular-devkit/build-angular:dev-server": "15.1.6",
Then I try to run npm run start and I get the error below stating that the dependency is still not installed:
> mean-course@0.0.0 start
> ng serve
Node packages may not be installed. Try installing with 'npm install'.
Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package.
Anybody have the same problem or know a solution? Any help would be appreciated thank you!
答案1
得分: 1
尝试在您的终端中运行以下命令:
npm i -D @angular-devkit/build-angular
英文:
Try this command in your terminal:
npm i -D @angular-devkit/build-angular
答案2
得分: 1
尝试运行以下命令:
npm install --save-dev @angular-devkit/build-angular
英文:
Try to run this
npm install --save-dev @angular-devkit/build-angular
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论