How can I circumvent the wrapping Router requirement error?

I have a ui library that lives in a monorepo with my core application. I'm structuring a lot of component in the ui package so that it can be shared across projects. I have a header and footer inside that library that wants to use utilities that require solid-router ie. <A> specifically. Since UI isn't directly wrapped in a router context it errors. Curious to know if anyone has any suggestions to get around this and ship the components without that will eventually be used within a router context?
10 Replies
thetarnav
thetarnav2y ago
Since UI isn't directly wrapped in a router context it errors.
Why would the UI lib error? It's up to the user to wrap the app with a router before using the library, no?
davedbase
davedbaseOP2y ago
That was my assumption as well but it’s complaining regardless. I’m investigating if it’s the monorepo setup
thetarnav
thetarnav2y ago
it might be the "multiple instances of solid" problem
davedbase
davedbaseOP2y ago
….it would have given us trouble in other places in that case
thetarnav
thetarnav2y ago
unles reactivity works fine?
davedbase
davedbaseOP2y ago
It does yeah
thetarnav
thetarnav2y ago
Then maybe some of the <A> components are being used outside of the router?
davedbase
davedbaseOP2y ago
Nope they are all within the scope of the app under router
thetarnav
thetarnav2y ago
If you have stackstace of that error you could try to inspect the sources for some leads
davedbase
davedbaseOP2y ago
That will be my next path for investigation Will report back
Want results from more Discord servers?
Add your server