Skip to content
Advertisement

Error: Absolute route path “/” nested under path “/app” is not valid

I suddenly get this error and not sure why.I did not change the "react-router-dom": "^6.0.0-beta.4" version. But the "react-dom": "^16.8.4"” had changed to "react-dom": "^16.13.1", Dunno if that had anything to do with I don’t know but the useRoutes comes from "react-router-dom" and that’s where the error originate ya.

Anyone have a clue?

enter image description here

Here is my App.jsx where i use the useRoutes(routes) and it’s giving me the error:

JavaScript

Here are the routes and I have not changed them in the last month:

JavaScript

Advertisement

Answer

I have seen the error message and it clearly explains that path “/” should not be given under route “app”.So try changing the path to some other valid name or remove it.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement