-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global css #39
Comments
Can you provide more details like the Next.js version. A reproduction would be great |
I get the same error when trying to use getTweet server side in a trpc query, and EmbeddedTweet on the client, "next-tweet": "^0.7.2" & "next": "^13.2.1" using pages.
|
Can you create a minimal reproduction that I can take a look at? 🙏 |
Project was using Next.js version 12 so I upgraded it to 13.2.3. But we are not using experimental app dir or mdx. I was just wondering if I could use EmbeddedTweet component to display tweet provided I get parsed tweet data from Syndication endpoint on my server.
|
Update, I got it working by adding app experimental feature in next config and adding app directory. But I dont see a reason for this. |
According to that error you were using |
I don’t use that setup, I have a similar tweet page component but in that component I call a trpc endpoint to get the tweet rather than using static props, is this scenario not possible? I do this because my tweets are dynamic and I render a lot of them |
Check this thread, last 2 comments (vercel/next.js#19936) |
CSS Modules are allowed in the way they're currently being used. That's how they work for Next.js, Remix, CRA, Vite, and likely more. I don't think the issue is CSS Modules 🤔 I can help you figure out the issue if you provide a reproduction for me to take a look at 🙏 |
For reproduction:
next config
package.json
go to src/pages/index.tsx of new project error
|
From my perspective, utilizing css-in-js can help address these types of issues. It can also simplify theme management for library users by using props |
@lfades Any luck reproducing this ? |
Reproduced. I'll update the docs to mention the fixes for this, one of:
The issue is because Next.js does not try to process CSS files from |
Installed this package with npm install next-tweet and got error in my project when compiling:
error - ./node_modules/next-tweet/dist/theme.css
Global CSS cannot be imported from within node_modules.
Thought I could just use my server to get tweet data and use EmbeddedTweet to display it.
The text was updated successfully, but these errors were encountered: