Skip to content
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

Warning when using ngx-translate v6.0.0-beta.1 with Ionic v2.0.0 #421

Closed
fiznool opened this issue Feb 8, 2017 · 8 comments
Closed

Warning when using ngx-translate v6.0.0-beta.1 with Ionic v2.0.0 #421

fiznool opened this issue Feb 8, 2017 · 8 comments

Comments

@fiznool
Copy link

fiznool commented Feb 8, 2017

When installing the newest ngx-translate beta into an Ionic 2 environment, the following npm warning is issued:

warning "@ngx-translate/[email protected]" has incorrect peer dependency "@angular/core@^2.3.0".

The same thing happens when installing the new http-loader:

warning "@ngx-translate/[email protected]" has incorrect peer dependency "@angular/core@>=2.3.0 || >=4.0.0-beta.0".

This is because Ionic 2 apps use Angular 2.2.1.

Is there a specific need to have a peerDependency of Angular 2.3.0+ or could it be relaxed to 2.2.1 for better compatibility with Ionic 2?

@ocombe
Copy link
Member

ocombe commented Feb 8, 2017

I did that because of this note in angular/angular 2.3.1:

Due to regression in the 2.3.0 release that was fixed by angular/angular#13464, components that have been compiled using 2.3.0 and published to npm will need to be recompiled and republished.

The >=2.3.1 compiler will issue is the following error if it encounters components compiled with 2.3.0: Unsupported metadata version 2 for module ${module}. This module should be compiled with a newer version of ngc.

We are adding more tests to our test suite to catch these kinds of problems before we cut a release.

But after reading the note again, and asking confirmation to the angular team, it just means that you shouldn't use 2.3.0 to compile. Since it has been fixed in 2.3.1 you can compile your lib again and it should work with all versions.
I'll change the peer dependency back to 2.x / 4.x. Thanks for opening the ticket :)

I'll publish a new beta later today.

@Richie765
Copy link

Could you do the same for http-loader? I've now installed @0.0.1 and it seems to work fine, but I'm not sure if that is ideal.

@fiznool
Copy link
Author

fiznool commented Feb 16, 2017

See ngx-translate/http-loader#1

@ocombe
Copy link
Member

ocombe commented Feb 16, 2017

It should be fixed, thanks @fiznool !

@miniplus
Copy link

miniplus commented Feb 21, 2017

@ocombe

The project I'm currently working on is on Angular 2.0.1.
I'm getting the following error:
Uncaught TypeError: ctorParameters.map is not a function

Apparently this has to do with the Angular compiler (http://stackoverflow.com/a/41444599).
The solution seems to be to upgrade to at least 2.3.1 because of changes.

If this is truly the case than this has to be reversed I guess?
The other possibility is to up the minimum dependency to 2.2.3 as you mentioned here

Cross referencing #386

@fiznool
Copy link
Author

fiznool commented Feb 21, 2017 via email

@miniplus
Copy link

  "dependencies": {
    "@angular/common": "2.0.1",
    "@angular/compiler": "2.0.1",
    "@angular/core": "2.0.1",
    "@angular/forms": "2.0.1",
    "@angular/http": "2.0.1",
    "@angular/platform-browser": "2.0.1",
    "@angular/platform-browser-dynamic": "2.0.1",
    "@angular/router": "3.0.1",
    "@ngx-translate/core": "^6.0.0",
    "@ngx-translate/http-loader": "0.0.3",
    "X-editable": "github:vitalets/x-editable",
    "bootstrap": "^3.3.7",
    "bootstrap-colorpicker": "^2.3.5",
    "bootstrap-duallistbox": "github:istvan-ujjmeszaros/bootstrap-duallistbox",
    "bootstrap-markdown": "^2.10.0",
    "bootstrap-progressbar": "^0.9.0",
    "bootstrap-slider": "^9.1.3",
    "bootstrap-tagsinput": "^0.7.1",
    "bootstrap-timepicker": "^0.5.2",
    "chart.js": "2.3.0",
    "ckeditor": "^4.5.10",
    "clockpicker": "0.0.7",
    "clone": "^1.0.2",
    "core-js": "^2.4.1",
    "debounce": "^1.0.0",
    "dropzone": "^4.3.0",
    "dygraphs": "^1.1.1",
    "fuelux": "^3.15.8",
    "he": "^1.1.0",
    "highcharts": "^4.2.7",
    "ion-rangeslider": "^2.1.4",
    "jquery": "^2.2.4",
    "jquery-color": "jquery/jquery-color#2.1.2",
    "jquery-jcrop": "^0.9.13",
    "jquery-knob": "^1.2.11",
    "jquery-ui-npm": "^1.12.0",
    "jquery-validation": "^1.15.1",
    "jquery.maskedinput": "^1.4.1",
    "jvectormap": "^2.0.4",
    "markdown": "^0.5.0",
    "morris.js": "^0.5.0",
    "ng2-bootstrap": "1.1.7",
    "ng2-popover": "git+https://github.com/griga/ng2-popover.git",
    "ng2-redux": "^4.0.0-beta.0",
    "nouislider": "^8.5.1",
    "primeng": "^1.0.1",
    "raphael": "^2.2.1",
    "redux": "^3.6.0",
    "rxjs": "5.0.0-beta.12",
    "scriptjs": "^2.5.8",
    "select2": "^4.0.3",
    "smartadmin-plugins": "^1.0.13",
    "summernote": "^0.8.1",
    "to-markdown": "^3.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "@types/jasmine": "2.5.41",
    "angular-cli": "1.0.0-beta.15",
    "angular2-template-loader": "^0.6.0",
    "codelyzer": "~0.0.26",
    "expose-loader": "^0.7.1",
    "imports-loader": "^0.6.5",
    "jasmine-core": "2.5.1",
    "jasmine-spec-reporter": "2.7.0",
    "karma": "1.3.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",
    "script-loader": "^0.7.0",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "2.0.2"
  }

No peer deps.

@fiznool
Copy link
Author

fiznool commented Feb 21, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants