发生未处理的异常:找不到模块"@ angular-devkit/build-angular". [英] An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"

查看:333
本文介绍了发生未处理的异常:找不到模块"@ angular-devkit/build-angular".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当运行ng server或ng serve终端命令时,出现此问题:

When running the terminal commands ng server or ng serve I'm getting this issue:

发生未处理的异常:找不到模块"@ angular-devkit/build-angular"

An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"

推荐答案

检入package.json以查看您的devDependencies部分中是否有此软件包

Check in your package.json to see if you have this package in your devDependencies section or not

"devDependencies": {
    "@angular-devkit/build-angular": "~0.803.18"
}

如果存在,请尝试

删除package-lock.json或yarn-lock.json

delete package-lock.json or yarn-lock.json

运行

npm cache clean --force

然后运行

npm i

这篇关于发生未处理的异常:找不到模块"@ angular-devkit/build-angular".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆