首页 > 解决方案 > 找不到角度模块:错误:无法解析“./app/app.module.ngfactory”

问题描述

我尝试构建我的 Angular 5 应用程序,但在运行“ng build -prod”后出现此错误:

Module not found: Error: Can't resolve './app/app.module.ngfactory' in 'C:\workspace\my-app\src'

然后我运行“./node_modules/.bin/ngc”来查看问题的根源,我收到了这条消息:

error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["node_modules","bower_components","jspm_packages"]'.

似乎 tsconfig.json 有问题,即使自上次成功构建以来我没有更改它,我得到这个的任何原因是什么?

角度版本:5.0.0

角/cli版本1.7.4

标签: angularbuild

解决方案


推荐阅读