node-quill-converter icon indicating copy to clipboard operation
node-quill-converter copied to clipboard

Can't import js library 'node-quill-converter'

Open Elwazer007 opened this issue 4 years ago • 1 comments

I 'm trying to install this library in a react-typescript app for quill node-quill-converte but i can't import it it exists in my node_modules folder after successful installation but while trying

import {convertTextToDelta} from 'node-quill-converter-improved'

It gets me an error that this path to library doesn't exist i 've also tried

const { convertTextToDelta } = require('node-quill-converter-improved');

it shows me this error

TypeError: fs.readFileSync is not a function

(anonymous function) node_modules/node-quill-converter-improved/lib/index.js:10 7 | let quillFilePath = require.resolve("quill"); 8 | let quillMinFilePath = quillFilePath.replace("quill.js", "quill.min.js"); 9 |

10 | let quillLibrary = fs.readFileSync(quillMinFilePath); 11 | let mutationObserverPolyfill = fs.readFileSync( 12 | path.join(__dirname, "polyfill.js") 13 | );

Elwazer007 avatar Nov 26 '21 19:11 Elwazer007

hi,bro i have the same problem,have you resolve this?

Fred-wizard avatar Apr 01 '22 08:04 Fred-wizard