DEV Community

Discussion on: Create a custom 404 page for your Vue 2 app

Collapse
 
mccrush profile image
Sergey Nikolaev

Errors in console: «Error: A non-empty path must start with "/"»

The way you mentioned works with Vue 2.*, but doesn't work with Vue 3.0.
And I cannot understand why ...

But thanks.
I'll ask on Github, maybe they will tell me there.

Thread Thread
 
amravazzi profile image
André Ravazzi

I think this will solve your problem: github.com/vuejs/vue-router-next#b...

TL;DR: You will need to replace path: "*" with path: "/:catchAll(.*)"

Thread Thread
 
mccrush profile image
Sergey Nikolaev

Thank you so much! 😀
You helped me a lot.
Now my 404 page is working.

Thread Thread
 
khalby786 profile image
khaleel gibran

Thanks for the solution!