Add children object syntax notFoundError
Hi!
Using file based routing. The autogenerated routeTree is using object syntax for rootRoute.addChildren.
This gives me a notFound error:
Warning: A notFoundError was encountered on the route with ID "__root__"
Getting the same error for all routes.
Switching back to array syntax removes the error, and the page renders as normal.
"@tanstack/react-router": "1.33.6",
"@tanstack/router-devtools": "1.33.6",
"@tanstack/router-vite-plugin": "^1.32.17",
Could it be something else Im doing wrong that works with array syntax, but not with object syntax?
Screenshot: from autogenerated routeTree.gen.ts
2 Replies
correct-apricot•16mo ago
Try removing node_modules and starting from clean slate
vicious-goldOP•16mo ago
For some reason vite-plugin updated, while react-router did not, I think that must have been mye issue.
Thank you, this worked.