question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3.6.0 wont build with --prod --build-optimizer --aot

See original GitHub issue

What is the current behavior? When building an angular app with ng build --prod --build-optimizer --aot with v3.6.0 I get the following error

ERROR in ./node_modules/@tinymce/tinymce-angular/fesm5/tinymce-tinymce-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 (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:265:35)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:77:21)
    at visitNodes (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16144:30)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16370:24)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16135:24)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16265:21)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16135:24)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16322:24)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16135:24)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16333:24)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16135:24)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16229:21)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNodes (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16144:30)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16379:24)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16135:24)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16377:21)
    at checkNodeForDecorators (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNodes (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16144:30)
    at Object.forEachChild (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:16372:24)
    at transformer (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:63:16)
    at /home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1390:86
    at reduceLeft (/home/shane/app/frontend/src/main/frontend/node_modules/@angular-devkit/build-optimizer/node_modules/typescript/lib/typescript.js:1102:30)

What is the expected behavior? For the build to succeed

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular? Issue occurring in v3.6.0 Issue not occurring in v3.5.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
OSorokincommented, Jun 29, 2020

The same error. angular version 7.2.15 typescript 3.2.4

1reaction
ShaneMcGowancommented, Aug 13, 2020

Has anyone gotten this working? Sorry for the delay in replying to your earlier message!

Downgrading to v3.5.0 worked for us as a workaround and the editor is working fine. You can do this by changing the version to “3.5.0” in your package.json file and running npm install

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular-CLI v6: --no-aot build option equivalent - Stack Overflow
To do this from the command line, use the following options along with the --prod option. --aot=false --build-optimizer=false.
Read more >
What's new in Angular CLI 12.0? - Ninja Squad
The CLI v12 can no longer build applications with View Engine. ... aot , buildOptimizer , sourceMap and extractLicenses are now true ...
Read more >
Angular CLI: dev and prod builds with JiT and AoT - Yakov Fain
When you build the bundles with the -prod option, Angular CLI performs code optimization and AoT compilation. Let's see it in action by ......
Read more >
ng build fails if AOT is enabled (Angular 11) - DayPilot Forums
json` and set `aot` and `buildOptimizer` to `false` in the `production` configuration. 5. Run `ng build --prod` 6. It builds successfully, but is...
Read more >
Toolips ng build –prod error - MDBootstrap
Would you mind give me some suggestion on this? Thanks. my environment is: Angular CLI: 1.5.5. Node: 6.11.3. OS: win32 x64. Angular: 5.0 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found