Uncaught SyntaxError when integrating a build from the online builder when using `npm add file:./ckeditor5` in Vue
📝 Provide detailed reproduction steps (if any)
- Try to integrate a build from the online builder in accordance with our docs
- In the step that describes adding the package located in the
ckeditor5directory as a dependency, use npm instead of yarn like so:npm add file:./ckeditor5 - Run the app
✔️ Expected result
You should be able to see the editor running in Vue.
❌ Actual result
You get a blank page and an error in the console that reads: Uncaught SyntaxError: The requested module '/ckeditor5/build/ckeditor.js' does not provide an export named 'default' (at App.vue:8:10)
🤔 Additional details
As stated in the reproduction steps, this only happens when using npm. Using yarn via yarn add file:./ckeditor5 does not produce this issue.
Marking this as a regression because I'm fairly sure that npm add file:./ckeditor5 worked in an older version of the editor.
@mabryl could you specify your npm and node version?
Node v18.17.1 npm 9.6.7
Should I update and try again @Witoso?
I don't think it would help. What's your bundler in the app? If it's vite, there may be some additional configuration needed. I think this is a bundler issue, and this worked in Angular/React docs, but doesn't in Vue due to different bundlers.
There's a resolved issue for this on SO.
Yup, the bundler is the default one when using npm create vue@latest, so it's Vite.
I'll see if the issue persists when using webpack, for example.
@Witoso I was able to use your link to get the editor to show up in the dev environment, but deploy, I get the error:
index-f0797983.js:1 TypeError: this.editor.create is not a function
@DedicatedManagers could you also check the comment that was shared in our community with a config?
@Witoso I was able to use your link to get the editor to show up in the dev environment, but deploy, I get the error:
index-f0797983.js:1 TypeError: this.editor.create is not a function
did you find any solution?