-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No NgModule metadata found for '[object Object]' #908
Comments
Hi IAMtheIAM, |
I am running into the same issue and I already tried to switch the modules to 'export default' but the error stays the same. |
... |
I resolved my problem. |
Would you be able to provide your that fix on here. I am struggling as well and would like to compare my regex to see if it is correct. Thanks |
I have the same problem |
@rodrigoarantes I tried adding
|
Don't do default class on not lazy loaded module |
ok this should help |
This is solved when using entire path of the file containing the module and not the index |
I still get the issue. I tried adding
But get I'm using webpack@^2.1.0-beta.25, which doesn't allow "preloaders", instead it uses the "enforce: pre" option on the loader like this:
|
@Zigzag95 You are correct, but is there any solution how to get it working with a index.ts file? |
I'm surprised there is not a resolution to this after almost a month. Isn't there an angular official way to do this? It seems like it should be standard in webpack / angular 2 workflow. |
I have a similar starter with lazy loading, and it doesn't have the issue. Go and check it out: https://github.com/jussikinnula/angular2-mean-starter |
This issue is related to this #926 when you run the "npm run" in "c:\my_project" (pay attention to the casing) throw this warning and errors
And the page title is like this <%= webpackConfig.metadata.title %> for avoid this error only need change the path to "C:\my_project" (pay attention to the casing) |
@jussikinnula Thanks man, your repo helped my diagnose what was wrong with mine. Turns out that
But that gives many errors. Just by removing the line comments, it fixed it:
That was tricky to diagnose. The second part of my fix was that on my typescript loader, I was using So lessons:
|
When I try to navigate to the +detail component, it fails and throws an error instantly: What could cause this?
EXCEPTION: Error: Uncaught (in promise): No NgModule metadata found for '[object Object]'.
The text was updated successfully, but these errors were encountered: