Set up the right routing for vuejs app in s3 bucket

I have set up static hosting for a vuejs app and it keeps showing "file not found, object key does not exist"(on every refresh I did on the sub-pages).

SOLUTION

I noticed that error.html does not exist in the build(called dist in vuejs) directory, so I had to remove the error.html file I input while setting up the static hosting and I changed it to index.html for both the index page and error page.