We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Follow the README and in the step "3. Seeding your Stripe account" I got an error like below
Error in script: Cannot find module '/Users/xxx/redwood/example-store-stripe/api/src/lib/stripe' Require stack: - /Users/xxx/example-store-stripe/scripts/seed-stripe.js - /Users/xxx/example-store-stripe/node_modules/@redwoodjs/cli/dist/lib/exec.js - /Users/xxx/example-store-stripe/node_modules/@redwoodjs/cli/dist/commands/execHandler.js [FAILED] Cannot find module '/Users/xxx/example-store-stripe/api/src/lib/stripe' [FAILED] Require stack: [FAILED] - /Users/xxx/example-store-stripe/scripts/seed-stripe.js [FAILED] - /Users/xxx/example-store-stripe/node_modules/@redwoodjs/cli/dist/lib/exec.js [FAILED] - /Users/xxx/example-store-stripe/node_modules/@redwoodjs/cli/dist/commands/execHandler.js The script exited with errors.
I was able to proceed without any problems by revert the following commit
commit 822e875fb62649dc2df29553fa2b768dfb33e0ee (origin/tmp) ... diff --git a/api/src/lib/stripe.js b/api/src/lib/stripe.js deleted file mode 100644 index 78d89c9..0000000 --- a/api/src/lib/stripe.js +++ /dev/null @@ -1,24 +0,0 @@ -import Stripe from 'stripe' - -export const stripe = new Stripe(process.env.STRIPE_SK) - -export const handleStripeWebhooks = (event, context, webhooksObj) => { - let stripeEvent - try { - const sig = event.headers['stripe-signature'] - stripeEvent = stripe.webhooks.constructEvent( - event.body, - sig, - process.env.STRIPE_WEBHOOK_SK - ) - - let results = null - if (typeof webhooksObj[stripeEvent.type] !== 'undefined') { - results = webhooksObj[stripeEvent.type](event, context) - } - return results - } catch (error) { - console.log(error) - throw error - } -}
Is this an intentional file deletion or a bug?
The text was updated successfully, but these errors were encountered:
Not sure, but since this comment, the readme uses a different env variable; here's my version
// ./api/src/lib/stripe.js import Stripe from 'stripe' export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY) export const handleStripeWebhooks = (event, context, webhooksObj) => { let stripeEvent try { const sig = event.headers['stripe-signature'] stripeEvent = stripe.webhooks.constructEvent( event.body, sig, process.env.STRIPE_WEBHOOK_SK ) let results = null if (typeof webhooksObj[stripeEvent.type] !== 'undefined') { results = webhooksObj[stripeEvent.type](event, context) } return results } catch (error) { console.log(error) throw error } }
Sorry, something went wrong.
No branches or pull requests
What is happening
Follow the README and in the step "3. Seeding your Stripe account" I got an error like below
My Solution
I was able to proceed without any problems by revert the following commit
Question
Is this an intentional file deletion or a bug?
The text was updated successfully, but these errors were encountered: