👶 Firebase Cloud Functions Setup
How to setup a Firebase Cloud Functions environment with TypeScript
Installation and setup is identical for Mac, Windows, and Linux. The only requirement is NodeJS which is likely available on your system, but if not, install NVM https://github.com/nvm-sh/nvm.
Install Node
Cloud functions in either Node 6 or 8, so it is recommended that you setup your local env with. For example, with NVM
command line
nvm install 8
nvm use 8
Setup Cloud Functions
command line
npm install firebase-tools -g
firebase login
firebase init functions
cd functions
Common Issue on Windows
Incorrect environment path on windows https://github.com/firebase/firebase-tools/issues/610