Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NX monorepo support #284

Open
caioquirino opened this issue Oct 17, 2023 · 1 comment
Open

NX monorepo support #284

caioquirino opened this issue Oct 17, 2023 · 1 comment

Comments

@caioquirino
Copy link

Hello, great work in creating this promising tool to run next using Serverless architectures outside of Vercel! :)

I am trying to use it together with NX's NextJS support in a monorepo project and I am trying multiple things, but I would like to start the investigation from the beginning, so what I have tried first:

  • Just create a NX monorepo with a NextJS project
  • Build it using PNPM and shamefully hoisting enabled
  • Run the build command as below:
➜  derank git:(main) ✗ pnpm dlx open-next@latest build --build-command 'pnpm build' --app-path="./apps/frontend" --build-output-path="dist/apps/frontend"
Packages: +145
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 166, reused 145, downloaded 0, added 145, done
Error: next.config.js not found. Please make sure you are running this command inside a Next.js app.

So the first issue is that it can't find the next.config.js.

Am I doing anything wrong? Otherwise I can keep going with the more ways I have tried to make this work :)

@khuezy
Copy link
Collaborator

khuezy commented Oct 17, 2023

Try following this: https://github.com/lorenzodejong/nx-open-next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants