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

Avoid warning messages for Angular versions <6.0.0 #39

Closed
maximelafarie opened this issue Sep 24, 2018 · 4 comments
Closed

Avoid warning messages for Angular versions <6.0.0 #39

maximelafarie opened this issue Sep 24, 2018 · 4 comments

Comments

@maximelafarie
Copy link

maximelafarie commented Sep 24, 2018

I installed ckeditor5-angular on my project running with Angular 5.2.11.

When I serve it, it echoes the following warning messages:

warning " > @ckeditor/[email protected]" has incorrect peer dependency "@angular/core@^6.0.0".
warning " > @ckeditor/[email protected]" has incorrect peer dependency "@angular/common@^6.0.0".
warning " > @ckeditor/[email protected]" has incorrect peer dependency "@angular/forms@^6.0.0".

I saw that in the library's package.json there is:

...
  "peerDependencies": {
    "@angular/core": "^6.0.0",
    "@angular/common": "^6.0.0",
    "@angular/forms": "^6.0.0"
  },
...

So this is responsible of the warning messages. Replacing it with:

...
  "peerDependencies": {
    "@angular/core": ">=5.2.0",
    "@angular/common": ">=5.2.0",
    "@angular/forms": ">=5.2.0"
  },
...

will resolve this issue (tilde or caret won't match for both v5 and v6 Angular versions).

Maybe in the future you would like to create different tags to manage required versions of Angular. E.g: a v1 tag for Angular <6.0.0 and a v2 for Angular >= 6.0.0 ?

Actually the library works well as-is, but it would be nice to avoid theses warning messages. 😉

Cheers!

@ma2ciek
Copy link
Contributor

ma2ciek commented Sep 24, 2018

Hi!

Great to hear that the ckeditor5-angular works well for lower versions of Angular. I'll make a PR to downgrade these requirements.

I don't remember why I made it exactly ^6.0.0... Good catch.

@maximelafarie
Copy link
Author

Hi!

Yes, it works perfectly but I didn't try it with lower Angular versions. Anyway, with Angular 5.x.x it works like a charm and it actually saved me a lot of time! Thank you for this awesome lib! 😍

Thank you for your reactivity! 💪 🤘

@ma2ciek
Copy link
Contributor

ma2ciek commented Sep 24, 2018

Thanks for the positive feedback! It's always good to hear it. It's the motivation that keeps me going :)

@ma2ciek
Copy link
Contributor

ma2ciek commented Sep 24, 2018

For the Angular 4.x.x the build process throws the following error:

ERROR in Error:
Metadata version mismatch for module node_modules/@ckeditor/ckeditor5-angular/ckeditor-ckeditor5-angular.d.ts,
found version 4, expected 3, resolving symbol AppModule in src/app/app.module.ts,
resolving symbol AppModule in src/app/app.module.ts

I've been able to run it on the 5.0.0 so for the current code the 5.x.x version should be minimal. And I've seen that angular@7 will be released soon with changes that should be transparent for the ckeditor5-angular so I'd go with the >=5.0.0 range.

@pomek pomek closed this as completed in #41 Sep 25, 2018
pomek added a commit that referenced this issue Sep 25, 2018
Other: The package works fine with `Angular@5` so we decided to lower a minimal version of Angular to `>=5.0.0`. Closes #39.
@Reinmar Reinmar added this to the iteration 20 milestone Sep 25, 2018
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

3 participants