0

I have copied my existing Angular Project src and package.json file and created new angular project and replaced with my backup src and package.json files.

After that i run npm install. when i try to run the project by ng serve command i am getting this error.

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

2 Answers 2

2

Yeah found the issues its an angular version mismatch.

Sign up to request clarification or add additional context in comments.

Comments

1

You need to add paths to your lazy loaded modules to "files" in tsconig.aot.json:

...
"files" [
   ...
   "./ads1/ads1.module.ts",
   etc
   ...
],

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.