simondotm / nx-firebase

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

Failed to upload functions - checkFunctionsSDKVersion encountered error:Invalid Version: {} #57

Closed adiffmike closed 1 year ago

adiffmike commented 1 year ago

Hi so I've run into an issue, it's my first time using this package but when I try to deploy none of my functions were getting deployed. It would fail somewhat silently but I finally noticed this error. I am using shared modules in here but not sure what caused it exactly.

checkFunctionsSDKVersion encountered error:Invalid Version: {} Could not parse firebase-functions version '' into semver. Falling back to parseTriggers.

The fix was running (yarn in my case) install in the distribution directory, as it seems to actually be looking for the firebase-functions library in dist/app/[app_name]/node_modules not just the version set in the package.json.

Updating my pre-deploy script to "npx nx build enginebay --with-deps && cd dist/apps/[APP_NAME] && yarn install"

Seemed to fix it if anyone else runs into it.

firebase_functions 4.0.1 firebase cli 11.15.0 nx 15.0.0

simondotm commented 1 year ago

As per linked issue, this appears to be a firebase cli issue. Closing for now.