-
Notifications
You must be signed in to change notification settings - Fork 122
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
Error: Unexpected value '...' imported by the module 'AppModule' #13
Comments
Mmm, if it's saying |
that's one of the other imports that I am doing that works when I am not adding JsonApiModule
the original source for this project is https://github.com/akveo/ng2-admin development branch |
this may not be relevant to the existing committed code on master, since the version installed from
differs significantly from the latest commits here |
The last commits on master are very little and are not relevant. The version on NPM is the one tagged with v3.0.0 here. Maybe you can try to downgrade to v2.0.0 and see if you get the same error. |
It seems to have something to do with the providers: [PROVIDERS] declaration in angular2-jsonapi/module.ts (running with the downloaded source from master). If I remove that it does not err. If I then add it to the PROVIDERS declaration in app.module.ts providers and remove the JsonApiModule import it fails in the same way, stepping on other module imports. I don;t see anything obvious in the PROVIDERS reference, but it seems to be the origin of the issue that I am having. |
I had the same issue, I think there is some problem with the decorators. I worked around this by importing the angular2-jsonapi package before all angular packages with |
That did it, thanks! |
Maybe the problem is that the |
I tried doing that with the source I downloaded (I changed PROVIDERS to JSONAPIPROVIDERS). I still had some type of issue going on after the change (same error with the import of other modules) Loading the source higher in the load order worked for now, not sure what the long term fix is. |
Hi, when I want to import JsonApiModule in my AppModule, I have the error like this: here is the full imports part of the app which worked fine without JsonApiModule: I am using the latest version of Json-Api : |
I have searched online and it seems to be a problem with the webpack configuration of the Angular CLI: Are you actually using Angular CLI? |
I am using Angular CLI, Angular 2, and angular2-jsonapi and have encountered a similar error to this on installing: Setup: |
The new v3.4.0 should fix everything! Sorry if it took me so long! Tested with:
Please, let me know if it actually fixes. |
@ghidoz I am now getting a different error on building modules for the app (ng serve, ng build, etc.): I updated my Angular version number to match what you commented above as well. Should have the same set up as you. I'll try downgrading Angular 2 tomorrow and see if that changes anything. |
@ghidoz Ignore me. Somehow the angular2-jsonapi package was removed from my |
Running under Angular 2 release and when adding JsonApiModule to the imports in app.module.ts I get the following error in the browser:
zone.js:129 Uncaught Error: Unexpected value 'NgaModule' imported by the module 'AppModule'
It seems that after I add JsonApiModule to the app imports it invalidates other imports, not sure if this is an issue with this module or the other but I don't have the issue unless I add JsonApiModule to the app imports
The text was updated successfully, but these errors were encountered: