question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: functions.config() is not available

See original GitHub issue

Hi! big thank for this great sample! i did npm install in all src, function and root of project, but sudo firebase serve --only hosting,functions

FirebaseError: Error occurred while parsing your function triggers.

Error: functions.config() is not available. Please use the latest version of the Firebase CLI to deploy this function.
    at init (/home/valaoffice/functions-samples/isomorphic-react-app/functions/node_modules/firebase-functions/lib/config.js:46:19)
    at Object.config (/home/orloff/functions-samples/isomorphic-react-app/functions/node_modules/firebase-functions/lib/config.js:29:9)
    at Object.<anonymous> (/home/orloff/functions-samples/isomorphic-react-app/functions/index.js:28:29)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
laurenzlongcommented, Aug 24, 2017

It needs to be at least v0.5.7 for config to be emulated properly. Filed https://github.com/firebase/functions-samples/issues/219 for the samples to be updated so they will work right away after cloning.

In the meanwhile, you can run this command inside the functions folder:

npm install --save firebase-functions@latest

0reactions
laurenzlongcommented, Aug 28, 2017

Thanks for the update!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Cloud Functions locally gives error "functions.config ...
I get this error. Error: functions.config() is not available. Please use the latest version of the Firebase ...
Read more >
[Error] V2 functions deployment fails with error in cloud run ...
The error message is pretty clear on that: Detailed stack trace: Error: functions.config() is no longer available in Cloud Functions for ...
Read more >
Configure your environment | Cloud Functions for Firebase
Set environment configuration with the CLI​​ To store environment data, you can use the firebase functions:config:set command in the Firebase CLI. Each key...
Read more >
Troubleshooting Cloud Functions - Google Cloud
Others have to do with incorrect configuration. ... Build failed: Build error details not available. Please check the logs at <CLOUD_CONSOLE_LINK>
Read more >
Running Cloud Functions Locally Gives Error ... - ADocLib
functions.config() is not available" with Cloud Functions for Firebase using Node.JS. Cloud Functions for Firebase was just recently released and I am following ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found