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 updates my Next version after creating a new application #27004

Closed
YuriyDyachkov opened this issue Jul 19, 2024 · 2 comments
Closed

Nx updates my Next version after creating a new application #27004

YuriyDyachkov opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: docs

Comments

@YuriyDyachkov
Copy link

I have a large project on Next and I want to divide it into several projects and collect everything into a monorepository using Nx.

  1. I first initiated my project with the command npx nx@latest init --integrated.
  2. Then I made a monorepository from the project using the nx g convert-to-monorepo command. I had to work with the configs, but I was able to launch the project.
  3. Next, I wanted to create another application in my monorepository and move some of the code there. I use the nx g @nx/next:application command to create another application and Nx updates all my dependencies, upgrading the Next version to 14+, but I don't want to do that at this stage and my application breaks.

How can I get around this?
Am I doing something wrong?

@AgentEnder AgentEnder added the scope: nextjs Issues related to NextJS support for Nx label Jul 19, 2024
@MilanKovacic
Copy link
Contributor

When you use generators for the first time, or migrate to new versions of nx, it runs the migrations as specified here: https://github.com/nrwl/nx/blob/master/packages/next/migrations.json

Sometimes, these migrations involve updating related packages to achieve compatibility with infrastructure.
I recommend first upgrading your application, and then splitting it.

Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: docs
Projects
None yet
Development

No branches or pull requests

4 participants