telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
467 stars 217 forks source link

export 'ResizeBatchService' was not found in '@progress/kendo-angular-resize-sensor' #1935

Closed seangwright closed 5 years ago

seangwright commented 5 years ago

I'm submitting a...

Current behavior

It appears that the app still functions since we don't use @progress/kendo-angular-resize-sensor explicitly in our app.

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 36:1024-1045
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 28:886-907
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 50:885-906
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 50:862-883
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 48:741-762
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 48:718-739
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 24:1270-1291
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 36:1001-1022
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 30:911-932
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 30:888-909
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 24:1247-1268
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

WARNING in ./node_modules/@progress/kendo-angular-grid/dist/es2015/index.ngfactory.js 28:863-884
"export 'ResizeBatchService' (imported as 'i8') was not found in '@progress/kendo-angular-resize-sensor'

Expected behavior

Minimal reproduction of the problem with instructions

Update to latest, and run ng serve (w/ AOT)

Environment

Package versions: Angular

    "@angular/animations": "7.0.4",
    "@angular/cdk": "7.1.0",
    "@angular/common": "7.0.4",
    "@angular/compiler": "7.0.4",
    "@angular/core": "7.0.4",
    "@angular/flex-layout": "7.0.0-beta.19",
    "@angular/forms": "7.0.4",
    "@angular/http": "7.0.4",
    "@angular/platform-browser": "7.0.4",
    "@angular/platform-browser-dynamic": "7.0.4",
    "@angular/pwa": "0.10.6",
    "@angular/router": "7.0.4",
    "@angular/service-worker": "7.0.4",

Kendo

    "@progress/kendo-angular-buttons": "4.3.2",
    "@progress/kendo-angular-dateinputs": "3.5.1",
    "@progress/kendo-angular-dropdowns": "3.3.0",
    "@progress/kendo-angular-excel-export": "2.2.0",
    "@progress/kendo-angular-grid": "3.9.0",
    "@progress/kendo-angular-inputs": "3.4.0",
    "@progress/kendo-angular-intl": "1.6.1",
    "@progress/kendo-angular-l10n": "1.3.0",
    "@progress/kendo-angular-tooltip": "1.1.0",
    "@progress/kendo-data-query": "1.5.0",
    "@progress/kendo-drawing": "1.5.7",
    "@progress/kendo-theme-material": "1.5.0",

Dev dependencies

    "@angular-devkit/build-angular": "0.10.6",
    "@angular/cli": "7.0.6",
    "@angular/compiler-cli": "7.0.4",
    "@angular/language-service": "7.0.4",

Browser: n/a

System:

When I look at the dep graph for the @progress/kendo-angular-resize-sensor package I see the following

$ npm list @progress/kendo-angular-resize-sensor
my-app@0.1.0 C:\path\to\app
+-- @progress/kendo-angular-dropdowns@3.3.0
| `-- @progress/kendo-angular-resize-sensor@3.1.0
+-- @progress/kendo-angular-grid@3.9.0
| `-- @progress/kendo-angular-resize-sensor@3.1.0  deduped
`-- @progress/kendo-angular-inputs@3.4.0
  `-- @progress/kendo-angular-resize-sensor@3.1.2

If I look at @progress/kendo-angular-resize-sensor ResizeBatchService can't be found in any of the files in that folder.

The diff of my package.json after upgrading packages looks like this for @progress packages

-    "@progress/kendo-angular-inputs": "3.3.0",
-    "@progress/kendo-angular-intl": "1.6.0",
+    "@progress/kendo-angular-inputs": "3.4.0",
+    "@progress/kendo-angular-intl": "1.6.1",

Everything was working without issue before these package changes.

It looks like the versions of @progress/kendo-angular-resize-sensor that @progress/kendo-angular-dropdowns@3.3.0 and @progress/kendo-angular-grid@3.9.0 depend on are not compatible with the version that @progress/kendo-angular-inputs@3.4.0 expects.

Explicitly installing @progress/kendo-angular-resize-sensor@3.1.2 removes the warnings but results in this compilation error

ERROR in ./node_modules/@progress/kendo-angular-inputs/dist/es2015/index.ngfactory.js
Module not found: Error: Can't resolve '../../node_modules/@progress/kendo-angular-resize-sensor/dist/es2015/index.ngfactory' in 'C:\path\to\app\node_modules\@progress\kendo-angular-inputs\dist\es2015'
holger-at-schottel-de commented 5 years ago

We had have the same problem after updating kendo-angular-charts version. Try deleting the package-lock.json file and reinstalling npm packages. This solved the problem at our side.

tsvetomir commented 5 years ago

The error should clear up if you remove node_modules, package-lock.json and reinstall. You should see a single, de-duplicated reference to @progress/kendo-angular-resize-sensor@3.1.2 as a result.

The root cause is that all of the mentioned packages declare a dependency on @progress/kendo-angular-resize-sensor while it should be a peer dependency. In some situations npm will refuse to de-duplicate it, despite the fact that all packages would be satisfied with a single version.

Fixing it would be a breaking change and would require installing @progress/kendo-angular-resize-sensor as a direct dependency in your project. We're still contemplating on the best way to carry it out.

tsvetomir commented 5 years ago

Worked around the issue by pointing all packages to the latest version. The long-term plan is to make resize sensor a peer dependency with the next batch of breaking changes.

HadiSDev commented 5 years ago

I have tried removing package-lock.json and node_modules, and then npm install, but with no luck. Running on Angular7, using kendo charts

tsvetomir commented 5 years ago

@HadiSDev please open a new issue with more details regarding your setup.