title: CKEditorError: ckeditor-duplicated-modules in next js
body: <p>so my code is:</p>
  <pre class="lang-js prettyprint-override"><code>import { useEffect, useState, useRef } from &quot;react&quot;;
  
  function TextEditor({ token }) {
    const editorRef = useRef();
    const [editorLoaded, setEditorLoaded] = useState(false);
    const { CKEditor, ClassicEditor } = editorRef.current || {};
    const [data, setData] = useState(&quot;&quot;);
  
    useEffect(() =&gt; {
      editorRef.current = {
        CKEditor: require(&quot;@ckeditor/ckeditor5-react&quot;).CKEditor,
        ClassicEditor: require(&quot;@ckeditor/ckeditor5-build-classic&quot;),
        Paragraph: require(&quot;@ckeditor/ckeditor5-paragraph/src/paragraph&quot;),
      };
      setEditorLoaded(true);
    }, []);
  
    return (
      &lt;div className=&quot;bg-[#F8F9FA] h-5/7 overflow-y-scroll max-w-6xl mx-auto&quot;&gt;
        {editorLoaded ? (
          &lt;CKEditor
            editor={ClassicEditor}
            data=&quot;&quot;
            config={{
              plugins: [Paragraph],
              toolbar: [&quot;bold&quot;, &quot;italic&quot;],
            }}
            onReady={(editor) =&gt; {
              // You can store the &quot;editor&quot; and use when it is needed.
              console.log(&quot;Editor is ready to use!&quot;, editor);
            }}
            onChange={(event, editor) =&gt; {
              const data = editor.getData();
              setData(data);
            }}
          /&gt;
        ) : (
          &lt;p&gt;Loading...&lt;/p&gt;
        )}
      &lt;/div&gt;
    );
  }
  
  export default TextEditor;
  </code></pre>
  <p>so the problem is  I only want the Paraghraph in my editor but when I run this code it returns <code>CKEditorError: ckEditor-duplicated-modules</code> I have also tried to add <code>.Paragraph</code> in front of the import for the paragraph is there something wrong with the code</p>
  <p><strong>Note</strong> next js 12</p>