Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

functions.config().algolia.app_id; TypeError: Cannot read property 'app_id' of undefined #275

Open
ittechsathish opened this issue Sep 22, 2018 · 2 comments

Comments

@ittechsathish
Copy link

Thanks for stopping by to let us know something could be better!

Please run down the following list and make sure you've tried the usual "quick
fixes":

If you are still having issues, please be sure to include as much information as
possible:

Environment details

  • OS:
  • Node.js version:
  • npm version:
  • @google-cloud/functions-emulator version:

Steps to reproduce

  1. ???
  2. ???

Following these steps will guarantee the quickest resolution possible.

Thanks!

@abeisgoat
Copy link

Hi, please follow the template if you're having any issue with the emulator.

@jaschaio
Copy link

jaschaio commented Apr 8, 2019

@ittechsathish Make sure to follow the steps here, especially running this within your functions directory:

firebase functions:config:get > .runtimeconfig.json

Of course you have to make sure before that you have actually set something for your functions config, so for example:

firebase functions:config:set algolia.app_id="YOUR_APP_ID"

Each time you change something at the function config you have to make the changes locally as well by running the first command again.

I had the same problem even after running the first command that a file within a subdirectory would get an empty functions.config object. But apparently that was due to having a second node_modules folder within said subdirectory. After deleting the second node_modules folder everything worked fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants