Next.js Discord

Discord Forum

PNPM equivalent of Styled Components

Unanswered
Beveren posted this in #help-forum
Open in Discord
BeverenOP
I’ve tried DaisyUI, I don’t like it

I hate in-line css,
What is a pnpm friendly stying framework like styled components, that allows you to define a style and use it?

Styled components is easy, but it errors in a pnpm project

27 Replies

maybe try adding node-linker=hoisted to an .npmrc file and then run pnpm i again?
that might get styled components working
@Beveren any luck?
@gabbagool <@694853013466251365> any luck?
BeverenOP
No, I tried “DaisyUI”, but it’s not good
@Beveren No, I tried “DaisyUI”, but it’s not good
no i mean have you tried getting styled-components working with the settings i suggested above
i think that could make it work with pnpm
@gabbagool no i mean have you tried getting styled-components working with the settings i suggested above
BeverenOP
Not yet, I created a new project that dosnt use neon or drizzle, they’re a joke to work with
Spot-breasted Oriole
It is possible, there are some threads in it from long ago but I too dropped SC after it seemed to be dying and didn’t support pnpm.

Ended up moving to tailwind and it grew on me, but here are alternatives I liked:

https://vanilla-extract.style/

https://stylexjs.com/
and by dying I mean, dropping styled-system, slower contributions to the core repo, and questionable RSC support (this may have since been fixed)
@Beveren Not yet, I created a new project that dosnt use neon or drizzle, they’re a joke to work with
im very confused - we are talking about styled-components yes?
database choice may not be relevant at the moment
@gabbagool database choice may not be relevant at the moment
BeverenOP
The reason why I’m not using pnpm is because first, it’s really annoying using neon and drizzle, but then… when styled components didn’t work right….. that made me want to stop with that project…. It’s drizzle and neon are pretty bad
ah right fair
have you tried using yarn?
@gabbagool have you tried using yarn?
BeverenOP
Is it better than npm? I heard in some tutorial that pnpm is better then npm, that’s why I started into that project right away.
yeah its a little bit better than npm
has some nice features (like yarn upgrade-interactive) and while its faster than npm, its not as fast as pnpm
also has much less compatability issues than with pnpm
BeverenOP
Ok 👍 does it have any security issues with Mac?
nope
its developed by facebook and its very widely used
probably more popular than pnpm just because its more mature
BeverenOP
Ok 👍 well, neon and drizzle requried pnpm, that’s the main reason why I even installed it.
Idk if yarn uses all the features that they “require” to be able to use to
Spot-breasted Oriole
generally you can interchange pnpm and yarn.

Don’t want to reduce them to simple trade offs, but generally in my experience pnpm has better monorepo support, yarn is more mature (though pnpm is totally stable).