-
Notifications
You must be signed in to change notification settings - Fork 78
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
Custom build prints "Some CKEditor 5 modules are duplicated" to console #72
Comments
I can see that ckeditor5-vue wasn't updated to the latest versions of the packages and there are packages required in two different versions. First checked was "ckeditor5-build-classic": yours is "12.1.0" and vue's one is: "^11.0.1". So it might looks like before the ckeditor5-vue will not get updated you should use older packages for vue builds. |
From my understanding, it shouldn't be loading any build since I am making my own build. It should just be importing classic editor only. I don't know if the upgrade causes the error or they just added the error message in the newest version. |
The docs don't say to install any specific version. And the CKEditor Vue plugin doesn't import an editor or a build. It seems like the issue is with the webpack plugin. Apparently it takes whatever it can get out of node_modules even if it is redundant. |
I've been messing around with this and it really is confusing. I have two folders with identical package.json files. I can The issue only went away when I removed both package-lock.json and node_modules at the same time. It seems that package-lock.json is a function of the contents of both package.json and node_modules. Doing an upgrade puts it in an inconsistent state. And removing just node_modules or just package-lock.json isn't enough to fix it. You need to remove both at the same time. I'm sure this points to a deeper issue but it seems I have a way to rectify it for now. Maybe a note should be placed on the page for that error message to remove package-lock.json and node_modules if someone is seeing that message. |
This also happened to me at the moment, had been testing, reinstalling multiple times until I found this thread.
This save my day, thank you. |
I removed both package-lock.json, node_modules and the error is still here |
I'm noticing it to with the newest version. It seems that removing the Table module gets rid of it but I don't see the table module importing anything I'm already importing. |
Similar. I think I installed a few weeks ago, about 3, everything has been running smoothly. Moved it to a cicd environment, new npm install, new package.locks. errors. Saw this thread earlier and cleaned up shop, now I'm getting the errors too. Was playing with all types of npm/webpack config. |
I’ve just tried to install the alignment plugin and got the same error.
I have CK Editor classic installed and no other plugins.
Tayo Ademolu
… On 6 Sep 2019, at 02:57, Simon Hamermesh ***@***.***> wrote:
Similar. I think I installed a few weeks ago, about 3, everything has been running smoothly. Moved it to a cicd environment, new npm install, new package.locks. errors. Saw this thread earlier and cleaned up shop, now I'm getting the errors too. Was playing with all types of npm/webpack config.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm pretty sure you are not meant to just remove package-lock.json in js dev unless you are willing to update all the other libraries / risk bugs creeping in... |
Check your package.json - I get this error if I try using multiple plugins that aren't all from the same version of CKEditor, which happens automatically sometimes if you just npm install... |
In my scenario I am trying to use 2 builds:
There are 2 components: I also tried to get rid of ckeditor/ckeditor5-build-decoupled-document (as ckeditor/ckeditor5-build-classic was used earlier and it worked fine) and try to build manually via
But still, the error is still shown. |
@4unkur That's a correct behaviour. Here you can read how to use two or more editors and create superbuilds. |
Solved this by removing node_modules on a plugin used on my custom build before building the entire classic editor instance. Hope this helps. |
Also exclude node modules on webpack config of your custom build |
I had the same error with alignment plugin. In my case all the others plugins I had installed were version |
I had the same issue when I was trying to use CKEditor in my .vue component. So I had to clone the repo as described in the doc (https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html) I added this adapter (https://www.npmjs.com/package/@ckeditor/ckeditor5-upload) but every time I did an There was nothing in that description that helped me So I found this issue and @jeanhillesheim said that it could be something with the versions installed. So This is my code Package.json "dependencies": {
"@ckeditor/ckeditor5-build-classic": "github:SimonJ/ckeditor5-build-classic#stable",
"@ckeditor/ckeditor5-vue": "^1.0.1",
} app.js import Vue from 'vue'
import CKEditor from '@ckeditor/ckeditor5-vue'
Vue.use(CKEditor) VueComponent.vue <template>
<div>
<ckeditor v-model="textBlock" :editor="editor" :config="editorConfig"></ckeditor>
</div>
</template>
<script>
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
export default {
data() {
return {
editor: ClassicEditor,
editorConfig: {
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
{ model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' },
{ model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' },
],
},
mediaEmbed: {
previewsInData: true,
},
simpleUpload: {
uploadUrl: '/files',
headers: {
'X-CSRF-TOKEN': window.Laravel.csrfToken,
},
},
link: {
addTargetToExternalLinks: true,
},
},
}
}
} |
As the original problem seems to be solved, I'm closing this issue. |
I've confirmed that this isn't anything to do with my environment. With a simple setup with only the following imports
I get several lines of "log.js?f27c:57 ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated. Read more:" printed to my console. I am unable to find anything in my Vue config or package.json that is causing this.
Here is a repository where you can see the issue: https://github.com/agronick/ckeditor-import-example
Even with nothing else besides the EseentialsPlugin and the ClassicEditor imported the messages are still printed to the console.
The text was updated successfully, but these errors were encountered: