Skip to content

Builds error when using next's i18n due to lack of serverless/pages/index.html file #75

Closed
netlify/next-on-netlify
#163
@neefrehman

Description

@neefrehman

I'm trying to move a Next.js site (which uses next's i18n routing) over to Netlify, but sadly can't due to this error:

Error: ENOENT: no such file or directory, stat '.next/serverless/pages/index.html'

It's true that this file doesn't exist. Instead, the default homepage can be found at '.next/serverless/pages/en/index.html' (replacing "en" with whatever default locale is set in next.config.js).

It would be great to detect if i18n is in use, and then get the homepage's file location by reading the default locale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions