Can't import js library 'node-quill-converter'
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 | );
hi,bro i have the same problem,have you resolve this?