simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Dependency conflicts since nx version `16.8.1` #155

Closed simondotm closed 7 months ago

simondotm commented 9 months ago
          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

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 https://github.com/simondotm/nx-firebase/issues/151#issuecomment-1733714532

simondotm commented 8 months ago

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

pikilon commented 8 months ago

While it's works (and does) it is ok

El sáb, 14 oct 2023, 15:07, Simon M @.***> escribió:

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

— Reply to this email directly, view it on GitHub https://github.com/simondotm/nx-firebase/issues/155#issuecomment-1762889549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXEYZIJZWQOV7LEEFTVKDLX7KE7RAVCNFSM6AAAAAA5LSL762VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRSHA4DSNJUHE . You are receiving this because you were mentioned.Message ID: @.***>

mjbates7 commented 8 months ago

@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: https://github.com/nrwl/nx/pull/19728

simondotm commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

I have migrated my personal project (NX@16.8.0) to NX@17.0.0 and everything is fine and fixed, this is what I did:

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 commented 8 months ago

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 commented 8 months ago

Sorry to bring bad news, Maybe is only related to my project https://github.com/simondotm/nx-firebase/issues/163

simondotm commented 7 months ago

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