To fix this, I needed to run the firebase functions folder from the root path of your folder:
npm update -g firebase-functions;
run it again.
npm update -g firebase-functions;
Then update the node_modules in your function directory according to the tip above
cd functions; npm install firebase-functions@latest firebase-admin@latest ;
Note. Interestingly, NPM complained that the installation of both packages was invalid even after starting the installation again. However, running firebase deploy --only functions worked fine.
By the way, my simple script deployment shortcut can come in handy for those who don't like working in one large index.js file:
#!/bin/bash (cd functions/; cat header.js get*.js process*.js set* > index.js; ); firebase deploy --only functions say "fire base deploy done";
source share