steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.47k stars 1.03k forks source link

bug: remix │ |- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" node_modules/katex/dist/katex.min.css #432

Open bakikucukcakiroglu opened 1 month ago

bakikucukcakiroglu commented 1 month ago

Provide environment information

System: OS: macOS 14.5 CPU: (11) arm64 Apple M3 Pro Memory: 172.17 MB / 18.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node Yarn: 1.22.22 - /opt/homebrew/bin/yarn npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm pnpm: 9.6.0 - ~/.nvm/versions/node/v20.15.1/bin/pnpm

Describe the bug

I got this error when I try to use novel in my remix project. I used the same code in my next project and everything was perfect.

13:12:39 │            remix │ 1:12:39 PM [vite] Error when evaluating SSR module
/app/routes/app.products.$productId.editor/route.tsx: failed to import "novel/extensions"
13:12:39 │            remix │ |- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for

Link to reproduction

-

To reproduce

-

Additional information

No response

elianiva commented 1 month ago

i think this is caused be the css import specified here: https://github.com/steven-tey/novel/blob/ecdb5d2ff5d3e6ab5f5af95b5a81de3ab4e8a0e9/packages/headless/src/extensions/mathematics.ts#L1 which gets bundled when it's built, and node tries to import a .css file when doing ssr

someguy9 commented 1 month ago

Same issue here, not sure how to resolve

bakikucukcakiroglu commented 5 days ago

It looks like the library is dead. I wouldn't recommend using it for a production level work.