React-draft-wysiwyg: Problem importing Editor - Can't resolve 'draft-js'

Created on 26 Sep 2018  路  5Comments  路  Source: jpuri/react-draft-wysiwyg

I ran npm install react-draft-wysiwyg, imported the Editor by using import { Editor } from 'react-draft-wysiwyg';, yet, without even trying to use the Editor tag in my render it presents me with the error below, I have restarted the build and all but it still presents me with error.

Failed to compile.
./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js
Module not found: Can't resolve 'draft-js' in '/home/thiago/Documents/projects/puma/puma-frontend/node_modules/react-draft-wysiwyg/dist

Most helpful comment

https://github.com/jpuri/react-draft-wysiwyg/issues/390
I found the answer in the Issue above, basically had to add a --save when doing the plugins install.
npm i --save draft-js react-draft-wysiwyg
the projects readme didn't add the --save in the install instructions, making it so the error above occurred.

All 5 comments

is this plugin still being maintained? is it still working?

Had to use react-quill in the end

https://github.com/jpuri/react-draft-wysiwyg/issues/390
I found the answer in the Issue above, basically had to add a --save when doing the plugins install.
npm i --save draft-js react-draft-wysiwyg
the projects readme didn't add the --save in the install instructions, making it so the error above occurred.

Would you please tell how you import them?

../node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js
Error: ENOENT: no such file or directory, open '.....\node_modules\draft-js\node_modules\fbjs\lib\DataTransfer.js'

After installing the required package (I mean draft-js) I have faced with the above error!

390

I found the answer in the Issue above, basically had to add a --save when doing the plugins install.
npm i --save draft-js react-draft-wysiwyg
the projects readme didn't add the --save in the install instructions, making it so the error above occurred.

It solved the problem for me 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

june50232 picture june50232  路  4Comments

MaDejing picture MaDejing  路  3Comments

Satherial picture Satherial  路  4Comments

rajasekar-ideas2it picture rajasekar-ideas2it  路  4Comments

DiegoGallegos4 picture DiegoGallegos4  路  4Comments