-
Notifications
You must be signed in to change notification settings - Fork 122
Getting errors after installing angular2-jsonapi #35
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
Comments
I tried to install other versions of the |
I used https://github.com/AngularClass/angular2-webpack-starter now as project template. Seems to work until now. Let's see if it stays that way. |
As I didn't quite like that template when I looked closer at it I returned to angular-cli and debugged more. I think it may be something with core-js (used by angular-cli) vs. es6-shim (used by angular2-jsonapi), but my knowledge on that stuff is not deep enough to say if it's that or not. I will continue debugging, but hope somebody can give me a hint. |
I am working on this right now :) but it sucks. So I think I'm going to create an index.js file in the main folder. |
Thx! Now at least the errors are gone and it compiles without any warning or error. Unfortunately now I get the same like #36 - |
Additional note: I also tried |
Hi again :)
I also have this message, after the build process of the webpack dev server :
My datastore.service.ts
I feel unlucky... that blocks the build. If you need from me more information, don't hesitate. |
@supertino7 for the http error check the versions of @angular/http. Compare the note here: https://github.com/ghidoz/angular2-jsonapi#installation The other problem: Shuffling the imports (at top of the file and the imports array) unfortunately does not help :-( So I also still have that problem |
For me it's working :( |
I uploaded the code here: https://github.com/letsmeet-click/letsmeet-angular-ui but its actually just the |
@asmaps : do your angular-cli is based on Webpack too ? Thx for pointing me to the doc. I downgraded the @angular2/http from 2.1.0 to 2.0.0 as it's the version used by the package. For your information, on my side, angular2-jsonapi worked pretty fine when I was on : |
I also tried a completely new project now:
Install the module as described in the README: https://github.com/ghidoz/angular2-jsonapi#installation But I still get that error |
@supertino7 yes, the current version of angular-cli uses webpack. all versions of angular2-jsonapi before 3.2.1 don't work as there is the issue this issue was opened with |
I'm back with some new stuff So, this is my current package.json :
And this is what npm-check-updates proposes me to upgrade :
I run And here the app breaks down. I don't have error message in the build, but I have the famous So, one of the upgrade above is causing this. |
Thanks for debugging! So it's a conflict with the last version of one of your dependecies.. Maybe you can try again, updating just one library at the time, discovering which one causes the issue. |
Try this: restore everything as before running |
That seems strange... I have downgraded all @angular/* stuff to 2.0.0 and don't have the other packages that @supertino7 has or have the version he has before doing the update, but I still have the error in chrome console |
So maybe it's a dependency of a dependency that changes with the upgrade of a library that I don't have? |
@ghidoz : done it. And the app breaks down : I updated the following :
without touching to http and material |
Ok, I tried to upgrade @angular stuff one by one. @angular/core : the app doesn't build, some properties are missing, so I guess it can't work alone in v2.1.0. And there I've got my error message :
Package.json at this point :
|
@asmaps : Have you rm -rf your node_modules folder before downgrading ?
otherwise a simple edit of the package.json and |
Yes, I did that, but I noticed, that I sometimes had |
I also had the |
I am going to test it again with various versions and understand what is the cause |
Good, I'll stay tuned :) |
Ok, so here are my tests with angular2-jsonapi v3.2.1: Test 1I already have a project where I test my library:
Working Test 2Then I tried to upgrade:
Failing Test 3Then I manually upgraded the dependencies in angular2-jsonapi (deleting the
Working Test 4Then I did another test with a new project, with the latest angular-cli version:
Using the original angular2-jsonapi with:
Failing Test 5Upgrading manually angular in the library should work as in test 3, right?
No, is not :( Test 6I upgraded both the project and the library to the latest angular version:
Failing So, what the hell is the problem? With the old angular-cli was working, but with the most recent version is not... Maybe I can try to upgrade the angular version in the library and create a new v.3.2.2. What do you think? Now I'm doing in local, maybe from npm will work... |
Hello @ghidoz |
If you are using angular-cli you have to patch the webpack-config ( |
I just tried the new [email protected] but the error persists :( |
anything new on this one? I still have the error and no idea how to fix :-( |
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. |
Hi @ghidoz I can confirm that removing the import of reflect-metadata statements solve the problem. Great work! |
Awesome! 👍 Actually, only removing the import was not the solution. I also had to compile it for AOT, in order to have it working. Don't know why... |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
first thx for this library - sounds very promising. Unfortunately I can't get it to run as I get lots of errors after installing. As I'm fairly new to all this npm and JS stuff (only did python and jquery until a few months ago shame ) I don't know what to do with this error - maybe it's an easy fix. Googling didn't help me, so I hope you guys maybe have an idea.
The problem:
I bootstrapped an ng project with angular-cli's
ng new
( https://cli.angular.io/ ) this is working perfectly andng serve
runs without problems and gives me the hello world page in the browser. Now I try to install angular2-jsonapi withnpm install angular2-jsonapi --save
and already get some "UNMET PEER DEPENDENCY" error thing I don't know what to do with.My resulting
package.json
:when I now try to run
ng serve
I get lots of errors, also when I try to addimport { JsonApiModule } from 'angular2-jsonapi';
to my AppModule I only get an import error (not found).Can you point me somewhere how I can fix this?
Thx in advance
PS: Do you have an IRC channel or similar?
The text was updated successfully, but these errors were encountered: