I'm using tinymce 6.8.3 via the npm package and vite.
When importing import 'tinymce/themes/silver';
like the docs say I get the errors shown in the picture.
I experienced the same issue and this worked for me:
Follow instruction from https://www.tiny.cloud/docs/tinymce/latest/vite-es6-npm/ but change the below 2 lines:
/* content UI CSS is required */
import contentUiSkinCss from 'tinymce/skins/ui/oxide/content.js';
/* The default content CSS can be changed or replaced with appropriate CSS for the editor content. */
import contentCss from 'tinymce/skins/content/default/content.js';
Into:
/* content UI CSS is required */
import 'tinymce/skins/ui/oxide/content.js';
/* The default content CSS can be changed or replaced with appropriate CSS for the editor content. */
import 'tinymce/skins/content/default/content.js';
And make sure to add the 2 lines below to the tinymce initialization:
skin_url: 'default',
content_css: 'default',