simondotm / nx-firebase

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

Support `npm ci` with a `package-lock.json` #62

Closed simondotm closed 1 year ago

simondotm commented 1 year ago

We don't currently npm install prior to deployment so there is no package-lock.json generated in the dist folder.

It's not ideal to run npm install prior to every build/deploy, but the package-lock.json would be useful for the following reason (comment from another repo)

From my understanding, when deploying to Cloud Functions, Cloud Build installs your dependencies with npm ci, but your apps/api directory doesn't have a package-lock.json file, so your dependencies are installed in a non-deterministic way, which isn't desirable. If any dependency (e.g. firebase-functions) were introduced a bug in a minor release, this bug would suddenly appear on production.

simondotm commented 1 year ago

Possibly npm install --package-lock-only might do it...

simondotm commented 1 year ago

I've successfully deployed using plugin v0.3.4 against a 13.10.6 Nx workspace, with node version 14, and 16, firebase-tools 10.8.0 with no issues. Closing this.