Open ColinFrick opened 1 year ago
You can add "skipLibCheck": true
to tsconfig so you aren't type checking dependencies. We just released the type declarations so they may not be perfect yet. Will look into why these errors are occurring.
Same issue and same output when trying import {DOMParser} from 'mobiledoc-kit'
I'm also seeing this issue in a typescript node application that is using ESM. I'm trying to do
import { DOMParser, PostNodeBuilder, Renderer } from 'mobiledoc-kit';
But I get the following error:
(node:15254) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
...
export { DOMParser, Editor, MobiledocError as Error, ImageCard$2 as ImageCard, MOBILEDOC_VERSION$2 as MOBILEDOC_VERSION, Markup, Position, PostNodeBuilder, Range, MobiledocRenderer as Renderer, ui as UI };
^^^^^^
SyntaxError: Unexpected token 'export'
I believe we need to add "type": "module"
to the package.json
I'm currently evaluating different wysiwyg editor projects (Slate, Quill, Tiptap) and I wanted to check mobile doc out.
Sadly I get following errors when trying to use it:
I'm using typescript 4.8.3