Ckeditor5-angular: The 1.1.1 version break production builds

Created on 31 Oct 2019  路  10Comments  路  Source: ckeditor/ckeditor5-angular

Hello,

The latest release this morning broke the prod builds in Angular. We are on Angular 7.2.15 and kept running into the following error:

ERROR in ./node_modules/@ckeditor/ckeditor5-angular/fesm5/ckeditor-ckeditor5-angular.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined
at isAngularDecoratorMetadataExpression (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:265:35)
at checkNodeForDecorators (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:77:21)
at visitNodes (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16144:30)
at Object.forEachChild (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16370:24)
at checkNodeForDecorators (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24)
at Object.forEachChild (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16265:21)
at checkNodeForDecorators (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24)
at Object.forEachChild (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16322:24)
at checkNodeForDecorators (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24)
at Object.forEachChild (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16333:24)
at checkNodeForDecorators (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24)
at Object.forEachChild (C:\angular\angular-apps\standards-works\branches\v1_0_DEV\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16229:21)

bug

Most helpful comment

It's closed by https://github.com/ckeditor/ckeditor5-angular/commit/55788f58a642acd81e62c16184f34787fe4c6761.

Please, update your @ckeditor/ckeditor5-angular package to the latest version.

All 10 comments

Hello,

I am facing the same issue.

I am on Angular 5.0.0

This is pretty urgent

Ran into the same issue during a production deployment. Downgrading to 1.1.0 fixed my issue.

I'm on Angular 7.2.

package.json lists Angular 8 as a dependency, so if there's am upstream change from Angular 7 -> 8 that triggers this specific issue, ckeditor5-angular's README.md for 1.1.1 should be updated to note said change.

Im on Angular 8.0. Im having the same error aswell when deploying to production.

Ran into the same issue during a production deployment. Downgrading to 1.1.0 fixed my issue.

I'm on Angular 7.2.

package.json lists Angular 8 as a dependency, so if there's am upstream change from Angular 7 -> 8 that triggers this specific issue, ckeditor5-angular's README.md for 1.1.1 should be updated to note said change.

still run the same error when downgrade to 1.1.0

Hi,

Sorry for the issue, I'll try to fix it as soon as possible.

package.json lists Angular 8 as a dependency,

Yep, but that's an internal (dev) dependency only of this package, we release the package only with the peerDependencies pointing the Angular.

The issue was probably caused by upgrading the @angular-devkit, which seems pretty weird to me, as upgrading it caused the BC for older versions. I'll check it to be 100% sure.

still run the same error when downgrade to 1.1.0

Did you use the `"1.1.0" to point the exact version and not the "^1.1.0"?

Ok, I've found out that the ng-packagr@5 incorrectly compiles the library for the ng build --prod 馃槥It seems that the https://github.com/ckeditor/ckeditor5-angular/issues/96 should have higher priority.

I've just released the https://github.com/ckeditor/ckeditor5-angular/releases/tag/v1.1.2 version that should fix this problem.

It's closed by https://github.com/ckeditor/ckeditor5-angular/commit/55788f58a642acd81e62c16184f34787fe4c6761.

Please, update your @ckeditor/ckeditor5-angular package to the latest version.

Was this page helpful?
0 / 5 - 0 ratings