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