jmcooper / angular-fundamentals-files

353 stars 536 forks source link

No NgModule metadata found for 'UserModule'. #14

Open djohns73 opened 4 years ago

djohns73 commented 4 years ago

I have been "religiously" keeping up with building out the sample web app in the ng-fundamentals project here. After completing "Lazy Loading Feature Modules" in section 6, I should have a functioning new module that loads when clicking the "Welcome, John" link in the navbar. However, after completing this section (and double and triple checking that I didn't make any obvious mistakes), my app fails to even load anymore with the following message:

Failed to compile.

No NgModule metadata found for 'UserModule'.

I'm new to Angular but not to coding. In looking through browser console, I'm unable to find any better insight into the problem, and Visual Studio Code is showing no issues in my files.

Any help in troubleshooting would be greatly appreciated. Thanks!

-D

JMo911 commented 4 years ago

I am getting the same issue, and have tried ~10 different approaches. One straight from angular documentation and others from stack overflow. Still not having any luck here, which has put a screeching halt on my work with this course.

Any suggestions would be greatly appreciated. I'm attaching my latest attempt here for reference. app.zip

JMo911 commented 4 years ago

tsconfig_app_json_—_ng-fundamentals Finally got the lazy loading to work on my machine. I had to add this file path in my tsconfig.app.json. Hope it helps.

djohns73 commented 4 years ago

tsconfig_app_json_—_ng-fundamentals Finally got the lazy loading to work on my machine. I had to add this file path in my tsconfig.app.json. Hope it helps.

This did the trick! Thank you SO much for your help. REALLY appreciate it. Hoping there won't be anymore "gotchas" along the way on this course. ;)

anil-emerson commented 4 years ago

tsconfig_app_json_—_ng-fundamentals Finally got the lazy loading to work on my machine. I had to add this file path in my tsconfig.app.json. Hope it helps.

Thank you Jacob. You saved me! I tried several other option but nothing worked.

natkalia commented 4 years ago

tsconfig_app_json_—_ng-fundamentals Finally got the lazy loading to work on my machine. I had to add this file path in my tsconfig.app.json. Hope it helps.

Thank you, worked for me too!