-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Neither apiKey nor config.authenticator provided #667
Comments
Same here |
Same here with node stripe 17.2.0 , on a firebase cloud function code. I'm NOT using NextJs at all. |
Same here, I'm also experiencing this while using firebase cloud functions. |
Do you find the solution ? Because I have the same error |
Doe anyone have an example/reproduction they can share? @bclayton21 can you say more about how this work? I don't understand how you'd be loading/using Stripe.js in this context. |
Are any of you having this issue with this package specifically? @yafkari you mentioned |
Hey @brendanm-stripe , thanks for looking into this. Indeed, I pass env variables to loadStripe. I've put screenshots on my comment here: stripe/stripe-node#2207 (comment) Should have copied them in the issue, my bad. |
At the time you call |
function createStripeInstance() { i put this code in a utils/stripe.js file and i get this error: Uncaught Error Error: Neither apiKey nor config.authenticator provided If I don't use it, I get undefined |
What is your environment @abyssbandit97 ? Does providing the key as a string constant (not an environment variable) resolve the error? |
@brendanm-stripe that is my file : export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? "", { |
I had the same problem (production only) after the following package updates: from After a rollback, the error disappears. |
I have the same issue when building for production. I'm rolling back to 16.12.0 for now |
@WissemF123 That Similarly, @Yohannfra this module is currently as v4.8.0. The v16.x/v17.x module must also be stripe-node, not this module. |
It doesn't. I couldn't even see my secret_key when I displayed to the console. but it shows now |
@abyssbandit97 This is initialization code for This error is only thrown from within |
This is the fix I posted in my stackoverflow link from above: |
Based on the code path that throws this error and the examples I've seen so far, I am closing this as confusion around |
From reading the responses here I couldn't see what the fix was? I am using the stripe node package
It was working fine before upgrading to this version. |
@cagarweyne |
Sorry my mistake - thank you |
What happened?
Upgrading to 4.8.0 makes calling loadStripe to crash giving the error "Neither apiKey nor config.authenticator provided"
Please have a look at stripe/stripe-node#2207
Environment
No response
Reproduction
No response
The text was updated successfully, but these errors were encountered: