Skip to content

Instantly share code, notes, and snippets.

@francoisrenier
Last active October 26, 2017 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francoisrenier/c45b7b3a04c4da088005ed88f77dda0e to your computer and use it in GitHub Desktop.
Save francoisrenier/c45b7b3a04c4da088005ed88f77dda0e to your computer and use it in GitHub Desktop.
Emulate Firebase functions locally
-- 1. Downgrade node
-- Replace last line by 'sudo n stable' if you want to go back to the latest node version
sudo npm cache clean -f
sudo npm install -g n
sudo n 4.4.2
-- 2. Install latest version of firebase-admin/functions
-- On my side firebase-admin version = "^5.4.3" & firebase-functions version = "^0.7.1"
npm install --save firebase-admin@latest
npm install --save firebase-functions@latest
--3. If error, uninstall/install firebase-tools
npm uninstall -g firebase-tools
npm install -g firebase-tools
--4. Ready to go, run following command in functions folder
firebase serve --only functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment