Skip to content

404 req when deployed on Vercel #77

@Viktor-as

Description

@Viktor-as

hi,

I am using Next JS 13.4.7 with old Pages directory for routing. Also using next-translate-routes for URL translation which works great locally. But when I upload to vercel and I am visiting pages I see 404 in console and in network tab.

The pages are still getting all data and showing correctly, just that when next is fetching data from cache it fetches 2 times:

  1. /_next/data/ZAjS6fXQOKhw0BLn1dIOk/lt/contacts.json
  2. /_next/data/ZAjS6fXQOKhw0BLn1dIOk/lt/kontaktai.json

This is the same page only the first time it fetches with the same route name as it is declared in pages folder - "contacts" it gets status OK 304.
And the second time it fetches looking for the translated version - "kontaktai.json" and it gets status 404.

Locally I noticed that next is also fetching both of them "contacts.json" and "kontaktai.json" and both times it gets status code OK 304.
But why is it not working when deployed? Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions