S
SolidJS12mo ago
Wurfle

How to create a library that uses @solidjs/meta as a dependency

I'm writing a library that uses the @solidjs/meta Style component. I should be able to use this component in any Solid Start app because Start wraps everything in MetaProvider. However, I'm getting <MetaProvider /> should be in the tree error. How should I write my package dependencies to make sure the same instance of @solidjs/meta is used?
4 Replies
thetarnav
thetarnav12mo ago
make it a peer dep? with a generous version range
Wurfle
WurfleOP12mo ago
Is making it a peer sufficient? I’ve tried that but it’s still the same result. Same install version listed from pnpm why also
thetarnav
thetarnav12mo ago
Did you try doing a fresh install of node modules? or pnpm dedupe? it seems that there is something fucked with the app dependencies there is no point in having multiple copies of ye same package if the versions are not conflicting if you have the package linked locally it could use dependencies from a wrong repo
Wurfle
WurfleOP12mo ago
Ah I figured it out. I needed to use the file: protocol instead of pnpm link Thank you I changed the @solidjs/meta peer version to * also for good measure
Want results from more Discord servers?
Add your server