Page 1 of 1

Failed to compile Editor component.

Posted: 08 Apr 2018, 20:35
by omidd1315
hello
when we import Editor with this line of code.

Code: Select all

import {Editor} from 'primereact/components/editor/Editor';
This error occurred during the build time and cannot be dismissed.

Failed to compile
./node_modules/primereact/components/editor/Editor.js
Module parse failed: Unexpected token (10:24)
You may need an appropriate loader to handle this file type.
| export class Editor extends Component {
|
| static defaultProps = {
| id: null,
| value: null,

Re: Failed to compile Editor component.

Posted: 10 May 2018, 15:10
by aragorn
Do you have "quill": "1.3.3" in package.json file?

Re: Failed to compile Editor component.

Posted: 10 May 2019, 15:42
by Natethecoder2
I have a similar problem. Even after i updated my package.json to "quill": "1.3.3",

here's my error message.
error in ./node_modules/quill/dist/quill.snow.css

Module parse failed: Unexpected token (7:0)
You may need an appropriate loader to handle this file type.
| * Copyright (c) 2013, salesforce.com
| */
> .ql-container {
| box-sizing: border-box;
| font-family: Helvetica, Arial, sans-serif;

@ ./node_modules/primereact/components/editor/Editor.js 16:0-36
@ ./node_modules/primereact/editor.js

Re: Failed to compile Editor component.

Posted: 17 May 2019, 17:01
by Natethecoder2
As I investigated this is more related to a next.js issue and SSR not giving quill a "document" object to work with. We are moving on to slate.

Re: Failed to compile Editor component.

Posted: 24 Jun 2019, 10:45
by aragorn
Thanks a lot for the update! Unfortunately, I still couldn't replicate it.

Best Regard,