我已经复制了现有的Angular Project src和package.json文件,并创建了新的angular项目,并用备份的src和package.json文件替换了。
此后,我运行npm install
。当我尝试通过ng serve
命令运行项目时,出现此错误。
ERROR in ./$$_lazy_route_resource lazy namespace object
Module not found: Error: Can't resolve '/Users/Desktop/Angular/matrix/src/app/ads1/ads1.module.ngfactory.js' in '/Users/Desktop/Angular/matrix/$$_lazy_route_resource'
ERROR in ./$$_lazy_route_resource lazy namespace object
Module not found: Error: Can't resolve '/Users/Desktop/Angular/matrix/src/app/ads2/ads2.module.ngfactory.js' in '/Users/Desktop/Angular/matrix/$$_lazy_route_resource'
ERROR in ./$$_lazy_route_resource lazy namespace object
Module not found: Error: Can't resolve '/Users/Desktop/Angular/matrix/src/app/ads3/ads3.module.ngfactory.js' in '/Users/Desktop/Angular/matrix/$$_lazy_route_resource'
ERROR in ./$$_lazy_route_resource lazy namespace object
Module not found: Error: Can't resolve '/Users/Desktop/Angular/matrix/src/app/banner/banner.module.ngfactory.js' in '/Users/Desktop/A
是的,发现问题是角度版本不匹配。