Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError when integrating a build from the online builder when using npm add file:./ckeditor5 in Vue #263

Open
mabryl opened this issue Oct 27, 2023 · 7 comments

Comments

@mabryl
Copy link

mabryl commented Oct 27, 2023

📝 Provide detailed reproduction steps (if any)

  1. Try to integrate a build from the online builder in accordance with our docs
  2. In the step that describes adding the package located in the ckeditor5 directory as a dependency, use npm instead of yarn like so: npm add file:./ckeditor5
  3. 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 mabryl added type:bug regression squad:platform Issue to be handled by the Platform team. labels Oct 27, 2023
@Witoso
Copy link
Member

Witoso commented Oct 27, 2023

@mabryl could you specify your npm and node version?

@mabryl
Copy link
Author

mabryl commented Oct 27, 2023

Node v18.17.1
npm 9.6.7

Should I update and try again @Witoso?

@Witoso
Copy link
Member

Witoso commented Oct 27, 2023

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.

@mabryl
Copy link
Author

mabryl commented Oct 27, 2023

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.

@pomek pomek removed the squad:platform Issue to be handled by the Platform team. label Oct 27, 2023
@DedicatedManagers
Copy link

DedicatedManagers commented Oct 27, 2023

@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

@Witoso
Copy link
Member

Witoso commented Oct 30, 2023

@DedicatedManagers could you also check the comment that was shared in our community with a config?

@FrankyXie
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants