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
v0.10 only has
<Router>
, <Routes>
isn't necessaryI 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 />
If you're using an
<A>
outside of the router then that will happen, what do your routes look like?This is my App component
My routes are shown here, just one route
'/'
for the App
component as of nowIt's probably because you're passing
<App/>
to the route, you only need to pass the function itself as App
So something like this?
If so, it still shows the same error
Does
Navbar
have an <A>
in it? If so it needs to be put into the router's root
instead which the docs explainI've tried to change it to this, yet no change
Thank you so much, it works perfectly now
I seriously appreciate your patience and help provided