Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upGetting errors after installing angular2-jsonapi #35
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 angular-cli@v1.0.0-beta.18 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! |
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 serveruns without problems and gives me the hello world page in the browser. Now I try to install angular2-jsonapi withnpm install angular2-jsonapi --saveand already get some "UNMET PEER DEPENDENCY" error thing I don't know what to do with.My resulting
package.json:{ "name": "letsmeet-angular2-ui", "version": "0.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "start": "ng serve", "lint": "tslint \"src/**/*.ts\"", "test": "ng test", "pree2e": "webdriver-manager update", "e2e": "protractor" }, "private": true, "dependencies": { "@angular/common": "~2.0.0", "@angular/compiler": "~2.0.0", "@angular/core": "~2.0.0", "@angular/forms": "~2.0.0", "@angular/http": "~2.0.0", "@angular/platform-browser": "~2.0.0", "@angular/platform-browser-dynamic": "~2.0.0", "@angular/router": "~3.0.0", "angular2-jsonapi": "^3.2.0", "core-js": "^2.4.1", "rxjs": "5.0.0-beta.12", "ts-helpers": "^1.1.1", "zone.js": "^0.6.23" }, "devDependencies": { "@types/jasmine": "^2.2.30", "@types/node": "^6.0.42", "angular-cli": "1.0.0-beta.17", "codelyzer": "~0.0.26", "jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0", "karma": "1.2.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-remap-istanbul": "^0.2.1", "protractor": "4.0.9", "ts-node": "1.2.1", "tslint": "3.13.0", "typescript": "2.0.2" } }when I now try to run
ng serveI 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?