S
SolidJS13mo 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
KiloByteOP13mo ago
Brendonovich
Brendonovich13mo ago
v0.10 only has <Router>, <Routes> isn't necessary
KiloByte
KiloByteOP13mo 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
Brendonovich13mo ago
If you're using an <A> outside of the router then that will happen, what do your routes look like?
KiloByte
KiloByteOP13mo ago
This is my App component My routes are shown here, just one route '/' for the App component as of now
Brendonovich
Brendonovich13mo ago
It's probably because you're passing <App/> to the route, you only need to pass the function itself as App
KiloByte
KiloByteOP13mo ago
So something like this? If so, it still shows the same error
Brendonovich
Brendonovich13mo 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
KiloByteOP13mo ago
I've tried to change it to this, yet no change
Brendonovich
Brendonovich13mo ago
KiloByte
KiloByteOP13mo ago
Thank you so much, it works perfectly now I seriously appreciate your patience and help provided

Did you find this page helpful?