Failed to compile Editor component.

UI Components for React
Post Reply
omidd1315
Posts: 1
Joined: 08 Apr 2018, 20:26

08 Apr 2018, 20:35

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,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 May 2018, 15:10

Do you have "quill": "1.3.3" in package.json file?

Natethecoder2
Posts: 2
Joined: 21 Mar 2019, 23:18

10 May 2019, 15:42

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

Natethecoder2
Posts: 2
Joined: 21 Mar 2019, 23:18

17 May 2019, 17:01

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.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

24 Jun 2019, 10:45

Thanks a lot for the update! Unfortunately, I still couldn't replicate it.

Best Regard,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests