Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Failed to load next.config.js #92

@abdulmutalib1

Description

@abdulmutalib1

after packaging my app and try running it , i run into an error
`- error Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
/snapshot/next-sample/node_modules/next/dist/server/config.js:546
userConfigModule = await import((0, _url.pathToFileURL)(path).href);
^

TypeError: Invalid host defined options
at loadConfig (/snapshot/next-sample/node_modules/next/dist/server/config.js:546:78)
at async Proxy. (/snapshot/next-sample/node_modules/next/dist/server/next.js:260:44)
`
Thing i have tried are:

  • everything works fine when i run in dev mode
  • when i build and 'next start', it also works fine
  • start a new next project - still encounter same error
  • when i remove the next-config.js - it works but then i run into eslint problems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions