one of my cloud functions on firebase exits with code 16 as an error.
I tried to google and find out what that code is but no luck at all.
Error: P
Had the same issue. As @cDitch mentions my code was not 100% complete. However the biggest issue for me were outdated packages.
I needed to upgrade firebase-admin, firebase-functions and firebase-tools as well as eslint.
you can see which packages are outdated by running:
npm outdated
Then i've changed the dependencies manually inside the package.json to the latest version mentioned by npm outdated.
It's possible that it'll cause deploy issues after you do this. At least this is what happened to me. Completely removing the node_modules and reinstalling them fixed this.
Here's two lines i've added to my package.json scripts to do this on windows:
"clean": "rmdir /s /q node_modules",
"reinstall": "npm run clean && npm install",
now you can run the following command
npm run clean
npm install
or
npm run reinstall
to execute those steps.