You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行Angular项目时出现Cannot read properties of undefined (reading 'Minus')错误

Angular项目运行报错:Cannot read properties of undefined (reading 'Minus')

问题详情

启动项目时触发未处理异常:

error: An unhandled exception occurred: Cannot read properties of undefined (reading 'Minus') See "C:\Users\DEVELO~1\AppData\Local\Temp\ng-t4Itqs\angular-errors.log" for further details.

可行解决步骤

  • 清理依赖缓存与重装:
    执行 npm cache clean --force 清除npm缓存,删除项目根目录下的 node_modules 文件夹、package-lock.json 文件,再运行 npm install 重新安装依赖
  • 对齐Angular CLI版本:
    用 ng version 查看全局CLI版本与项目本地版本,若不一致,执行 npm install @angular/cli@项目对应版本 --save-dev 安装匹配的本地CLI版本
  • 排查第三方依赖问题:
    该错误多与图标库、UI组件库的导入/配置错误相关,检查是否存在未正确导入的Minus图标,或依赖版本不兼容的情况,尝试升级/降级对应依赖包
  • 定位精准报错点:
    打开提示路径中的 angular-errors.log 文件,查看详细堆栈信息,找到报错的具体文件和代码行,针对性修复问题

内容的提问来源于stack exchange,提问作者josmi joseph

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 15:17:03