S
SolidJS12mo ago
KiloByte

Routes Component Not Available

Hey There! I'm very new to solid and am exploring. I've been trying to use the solid router, but run into a few issues. Firstly, the Routes component doesn't seem to be available for some reason. Error: Uncaught SyntaxError: The requested module '/node_modules/@solidjs/router/dist/index.jsx' does not provide an export named 'Routes' (at index.jsx:6:25) Any help would be greatly appreciated.
11 Replies
KiloByte
KiloByteOP12mo ago
Brendonovich
Brendonovich12mo ago
v0.10 only has <Router>, <Routes> isn't necessary
KiloByte
KiloByteOP12mo ago
I also get this error when using an A tag, thought it would be due to the missing <Routes>: Uncaught Error: Make sure your app is wrapped in a <Router />
Brendonovich
Brendonovich12mo ago
If you're using an <A> outside of the router then that will happen, what do your routes look like?
KiloByte
KiloByteOP12mo ago
This is my App component My routes are shown here, just one route '/' for the App component as of now
Brendonovich
Brendonovich12mo ago
It's probably because you're passing <App/> to the route, you only need to pass the function itself as App
KiloByte
KiloByteOP12mo ago
So something like this? If so, it still shows the same error
Brendonovich
Brendonovich12mo ago
Does Navbar have an <A> in it? If so it needs to be put into the router's root instead which the docs explain
KiloByte
KiloByteOP12mo ago
I've tried to change it to this, yet no change
Brendonovich
Brendonovich12mo ago
KiloByte
KiloByteOP12mo ago
Thank you so much, it works perfectly now I seriously appreciate your patience and help provided
Want results from more Discord servers?
Add your server