Kendo-angular: Can't import GridModule with Angular 2.0.1

Created on 27 Sep 2016  路  3Comments  路  Source: telerik/kendo-angular

Hi,

after upgrading to Angular 2.0.1 from Angular 2.0.0, the following error is thrown in the browser by the Angular compiler when GridModule is imported:

Uncaught Error: Unexpected value 'GridModule' imported by the module 'AppModule'

My dependencies:

...
  "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",
    "@progress/kendo-angular-grid": "0.3.2"
  }
...

Any ideas?

Most helpful comment

After posting this issue I also noticed the dependencies of kendo-angular-grid to Angular 2.0.0. I guess I expected that minor versions wouldn't affect the compatibility, since no Angular APIs changed. I agree that a dependency to something like Angular 2.0.* would be more useful for the future.

Maybe also worth considering: Libraries like ng2-translate have their dependencies to Angular in "devDependencies" and require "peerDependencies" with "~2.0.0" notation.

All 3 comments

The cause for the error is that the current version of the Grid package (similar to the other kendo-angular-* packages) depends on Angular package exact version (2.0.0). And it will not work with other versions as this will result in loading multiple versions of Angular and the error in question.

Maybe we should relax a bit more the dependencies versioning schema and allow patch versions updates of the Angular packages. @underlog, @tsvetomir what do you think?

After posting this issue I also noticed the dependencies of kendo-angular-grid to Angular 2.0.0. I guess I expected that minor versions wouldn't affect the compatibility, since no Angular APIs changed. I agree that a dependency to something like Angular 2.0.* would be more useful for the future.

Maybe also worth considering: Libraries like ng2-translate have their dependencies to Angular in "devDependencies" and require "peerDependencies" with "~2.0.0" notation.

Was this page helpful?
0 / 5 - 0 ratings