This PR changed nrwl n…

1 minute read

This PR changed @nrwl/next:dev-server to @nrwl/next:server which broke everyone’s (my teams) build today and had me scratching my head about what on earth was going on :upside_down_face:

Is that to be expected from a minor version bump (9.2>9.3)?

Tbf I didn’t use the migrate functionality, didn’t know about before now that I went looking for it. Still, a bit confused :grimacing:

https://github.com/nrwl/nx/pull/2792

Responses:

I’m also a bit confused how to use the migration command

Just to clarify I love the changes this PR introduced, I’m just worried about the fact these were effectively breaking changes since they renamed the script breaking existing nextjs apps.

ah :disappointed: we seem to have forgotten the migrations for this one - really sorry about that, and thanks for pointing it out! Now that more people are depending on the @nrwl/next package, we’ll make sure to be a lot more careful about breaking changes (as we’ve been doing with the @nrwl/react package)

in general, we try not to have breaking changes between minor versions, but if we do, automated migrations should be included

so next time you update Nx, please try doing it with nx migrate 9.3.0 (or the version number you want)

that will figure out what breaking changes there are between your current version the one you’re updating to and will create a migrations.json file with all the schematics needed to update your workspace automatically

it will then tell you to run nx migrate --run-migrations=migrations.json which will actually apply those migrations

see here: https://nx.dev/angular/workspace/update

No harm was done since it only affected development and it only wasted a bit of time. Thankfully we’re using storybook so we could keep working on individual components even though the main app wouldn’t start locally.

I’ll make sure to try the migrate command next time, thanks

Will this particular change have a migration, or should we go ahead and manually update our workspace.json? Thanks!

the migration for this particular change was missed out, so please do the manual update - but it’s still recommended you use the nx migrate command when updating, to ensure it applies any other migrations :thumbsup:

just a quick update on this - I created a migration that will be included in the next minor patch 9.3.1 , so anyone upgrading 9.2.4 or earlier via an nx migrate 9.3.1 (when it’s released) shouldn’t see this problem anymore

Updated: