michelson / Dante

Just another Medium wysiwyg editor clone
https://dante-editor.dev
2k stars 189 forks source link

Uncaught TypeError: styled.div is not a function #276

Open tejasvinu opened 7 months ago

tejasvinu commented 7 months ago

Uncaught TypeError: styled.div is not a function js Dante.js:1117 js Dante.js:2 js Dante.js:5 __require chunk-YJNMHHGL.js:11

dante3.js:43626 [Dante.js:1117:31](http://localhost:5173/node_modules/dante3/package/umd/Dante.js) js Dante.js:1117 js Dante.js:2 js Dante.js:5 __require chunk-YJNMHHGL.js:11 dante3.js:43626 Error after using danteditor in react app.
luisaraujoc commented 7 months ago

I'm having the same problem

VS Code displays the following message regarding 'import { Dante } from 'dante3': image

And Dev mode Browser: image

I don't understand how I can use VS Code's recommendation about dante3.d.ts to my advantage, I know I have to mess with ts.config.json. However, I'm using React built by Vite using JS and not TypeScript

jersoncarin commented 3 months ago

I encountered this error, I fixed it by importing the esm import DanteEditor from "dante3/package/esm"