-
Notifications
You must be signed in to change notification settings - Fork 192
Description
checkRunningInsideNextjsApp works based on the assumption that there must be a Next config file for the application:
opennextjs-aws/packages/open-next/src/build/helper.ts
Lines 491 to 494 in cfbc4fb
| logger.error( | |
| "Error: next.config.js not found. Please make sure you are running this command inside a Next.js app.", | |
| ); | |
| process.exit(1); |
If such a file does not exist this function forcefully terminates the process.
The issue is that I think that the Next config file is actually not mandatory, for example take the following starter from Vercel: https://vercel.com/templates/portfolio/portfolio-starter-kit (https://github.com/vercel/examples/tree/main/solutions/blog), there is no Next config file, but Next.js doesn't seem to be a problem.
Additionally in the Next.js docs there isn't a mention that the Next config file is mandatory, they say that "Next.js can be configured through a next.config.js file" (not that it needs to be).
So ideally OpenNext should also support applications without the Next config file?
Note: I suspect that the vast majority of Next.js applications do include a next config file (create-next-app does create one for you) so maybe this is not a huge concern, I figured I'd raise the question anyways