简体   繁体   中英

Angular 14 An unhandled exception occurred: Script file node_modules/tinymce/themes/modern/theme.min.js does not exist

When run ng serve it show message:

⠋ Generating browser application bundles (phase: setup)

...An unhandled exception occurred: Script file node_modules/tinymce/themes/modern/theme.min.js does not exist.

⠋ Generating browser application bundles (phase: setup)...

and always loading.

please help me.

This my angular version:

Angular CLI: 14.0.6
Node: 16.16.0
Package Manager: NPM 8.14.0
OS: win32 x64

Angular: 14.0.6

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.6
@angular-devkit/build-angular   14.0.6
'@angular-devkit/core            14.0.6'
@angular-devkit/schematics      14.0.6
----------

What version of TinyMCE are you trying to use? The modern theme was part of TinyMCE 4 but does not exist in TinyMCE 5 or newer. If you have something like:

 theme: 'modern'

...in your TinyMCE configuration you need to remove that. If you don't state any theme value in your configuration TinyMCE will use its default (which is called Silver in TinyMCE 5 or newer).

If you are module loading TinyMCE you may be trying to import that theme which does not exist so you would need to import a theme that exists in the version of TinyMCE you are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM