tldraw / tldraw-v1

A tiny little drawing app. This is the original 2021-2022 version, released under MIT.
https://old.tldraw.com
MIT License
60 stars 36 forks source link

[bug] Next.js 13 - Global CSS cannot be imported from within node_modules #42

Closed milo- closed 7 months ago

milo- commented 1 year ago

Just tried to update to the latest version TLDraw and ran into this error ⬇️

./node_modules/@fontsource/caveat-brush/index.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/@tldraw/tldraw/dist/index.mjs

Import trace for requested module: ./node_modules/@fontsource/caveat-brush/index.css ./node_modules/@tldraw/tldraw/dist/index.mjs

I saw there's already been a discussion around this here https://github.com/tldraw/tldraw/pull/1091

It's a blocker from us upgrading to the latest version of tldraw

steveruizok commented 1 year ago

Oof, that makes sense. I'm surprised that our version built, given that we also use tldraw in a Next.js app.

huwllewellyn commented 1 year ago

It may be related to using the app directory https://github.com/vercel/next.js/discussions/27953#discussioncomment-3616122

TosinHub commented 1 year ago

Just tried to update to the latest version TLDraw and ran into this error ⬇️

./node_modules/@fontsource/caveat-brush/index.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/@tldraw/tldraw/dist/index.mjs

Import trace for requested module: ./node_modules/@fontsource/caveat-brush/index.css ./node_modules/@tldraw/tldraw/dist/index.mjs

I saw there's already been a discussion around this here tldraw/tldraw#1091

It's a blocker from us upgrading to the latest version of tldraw

Have you found a solution to this @milo-

steveruizok commented 7 months ago

Closing this as we won't be addressing a fix for this version. I believe this was fixed however. Check https://github.com/tldraw/tldraw for the latest! And please share there if the bug persists.