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

Dependency conflicts since nx version 16.8.1 #155

Closed
simondotm opened this issue Sep 28, 2023 · 9 comments
Closed

Dependency conflicts since nx version 16.8.1 #155

simondotm opened this issue Sep 28, 2023 · 9 comments

Comments

@simondotm
Copy link
Owner

          Hey Simon I am working with nx version `16.8.1`  and I had a problem that I fixed in the end.

Steps to reproduce

  • nx version 16.8.1
  • Install "@simondotm/nx-firebase": "^2.1.0"
  • Create a functions firebase app with your extension
  • package.json got modified with "esbuild": "^0.17.17"

Current behaviour
You can't run npm install any longer for a conflict between esbuild and "@nx/esbuild": "16.8.1",

My fix
In my case I have to change the version of "esbuild": "^0.17.17" to "esbuild": "^0.19.2"

If I removed esbuild = no more compilations of the functions

I hope it could help the next one.

Than you for your work @simondotm !!

Originally posted by @pikilon in #151 (comment)

@simondotm
Copy link
Owner Author

Not gonna lie - this one is a headache. Not sure why this happens or how to fix it. 😕

@pikilon
Copy link

pikilon commented Oct 14, 2023 via email

@mjbates7
Copy link

@simondotm fyi I had this issue I raised with the nx team on their discord (and someone else did on their GH) and it looks like they've now fixed it: nrwl/nx#19728

@simondotm
Copy link
Owner Author

@mjbates7 ok thats good news, thanks for sharing this.
I guess this means we will all have to update Nx again in our workspaces, and that Nx versions 16.8.1 thru to whichever nx release that fix arrives will be incompatible for us nx-firebase plugin users. 😕

@mjbates7
Copy link

Seems like it. It's landed in their latest v17.0.0 release https://github.com/nrwl/nx/releases/tag/17.0.0 as a heads up so I'll probably migrate to that now

@pikilon
Copy link

pikilon commented Oct 20, 2023

I have migrated my personal project ([email protected]) to [email protected] and everything is fine and fixed, this is what I did:

  • nx run migrations latest and --run-migrations
  • removed [email protected] dependency using yarn
  • deleted dist, node_modules and yarn.lock
  • npx nx deploy firebase (including complex cloud-functions app)

Everything deployed correctly

Changes introduced by nx migration on nx-firebase projects

In the function app cloud-functions I have this change in the project.json (this change is done in all the projects in the workspace)
From

    "lint": {
      "executor": "@nx/linter:eslint",

To

    "lint": {
      "executor": "@nx/eslint:lint",

I hope this could help in the development, thank you @simondotm keep up the good work

@simondotm
Copy link
Owner Author

Great news, thanks for the update. Seems like Nx 17 is the way to go then.

@pikilon thanks for the migration note too. I think we're ok in the plugin because it uses the @nx/node plugin to scaffold function apps, which will use whichever Nx version is in the workspace.

So if already on Nx 17, it should scaffold the app with @nx/eslint
With pre-Nx-17, it will scaffold with @nx/linter but the Nx migration tool will take care of ensuring nx-firebase function apps stay upto date.

I'm glad I made this change to decouple node app generators in the v2 plugin; the original v1 plugin had its own implementation which would have been a real pain to keep the schemas upto date with the dizzying Nx release cadence. 😅

@pikilon
Copy link

pikilon commented Oct 22, 2023

Sorry to bring bad news, Maybe is only related to my project
#163

@simondotm
Copy link
Owner Author

Closing this issue as resolved.
Plugin users for Nx versions prior to 16.8.1 should update Nx to 17.0.0 or higher.

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

3 participants