Comments (10)
Hi, I am also having this issue even AFTER adding the proper code to the CLI, i.e. firebase functions:config:set stripe.token="..."
I also use
firebase functions:config:get
{
"stripe": {
"token": "my stripe secret api key"
}
}
EDIT-- Figured it out. There was syntax errors with my code. After this I received similar errors and had to npm install google logging and stripe
from functions-samples.
You will need to set your stripe token in the functions config. firebase functions:config:set stripe.token="..."
I'll be adding a Readme for this function today.
from functions-samples.
Thanks a lot
from functions-samples.
Will you please provide more detail on where to place firebase functions:config:set stripe.token="..."
? Can this be added via command line?
Is the functions config either firebase.json
or functions/index.js
?
from functions-samples.
Yes, add it through the CLI https://firebase.google.com/docs/functions/config-env
from functions-samples.
Awesome. Thank you!
from functions-samples.
I'm continuing to get functions.config().stripe.token saying token not a variable of undefined
-- could that be related to my node version (Node.js v8.2.1 but Google Cloud Functions only supports v6.11.1)
I can hardcode my Stripe API Secret key directly into the function
const stripe = require('stripe')('XXXXcorrectkey')
If I look at my config, it looks fine - as my secret key is in there when I do the command:
firebase functions:config:get gives me
{
"stripe": {
"token": "XXXXcorrectkey"
}
}
I'm not sure what the issue is.. or if it really matters.. but I'd prefer the key be in config(). Any hints?
from functions-samples.
My best psychic debugging is that when you ran firebase functions:config:get it was on a test project and the error is coming from your production project (or vice versa).
Also make sure you are using the latest version of firebase-tools
from functions-samples.
I changed my nodejs version to old 6.11.5 and I started getting this error. I switched back to new Nodejs nodejs 8.9.1 the problem is fixed. It also works fine with nodejs 6.12.3.
from functions-samples.
Similar to prakis, I had the same issue but with node 10. Downgrading to node 8 (8.16.0) made it deploy just fine.
from functions-samples.
Related Issues (20)
- [BUG] in sample:
- [BUG] in sample:
- LGTM
- [DOCS] Example app in readme.md does not work HOT 1
- [DOCS] for sample: taskqueues-backup-images, not clear how to set up "impersonation" permission HOT 2
- [BUG] in sample: alert
- DisplayUnlockCaptcha
- [BUG] in sample:
- [DOCS] for sample: taskqueues-backup-images, it simply doesn't work with tasks_fn.on_task_dispatched function, only with http_fn.on_request function HOT 5
- onTaskDispatched when region is set the function don't deploy to the region in sample:
- [BUG] Some phone numbers do not receive OTP SMS messages with Firebase phone auth: HOT 5
- Problems with sending push notifications
- functions predeploy error: Command terminated with non-zero exit code 2 HOT 1
- functions predeploy error: Command terminated with non-zero exit code 2 HOT 1
- [DOCS] for sample: python callable functions
- How is this still a problem 2 years later? I am running into this now.
- [BUG] in sample: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/v2/providers/scheduler' is not defined HOT 1
- [BUG] in sample:
- [DOCS] for sample: auth-blocking-functions | Cannot extract event_type HOT 1
- [DOCS] for sample: monitor-cloud-logging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions-samples.