skip to Main Content

Reactjs – Node.js receive form data sent from frontend

node.js server app.post('/create-checkout-session', (req,res) =>{ console.log(req.form); console.log(req.body); const session = await stripe.checkout.sessions.create({ line_items: [ { price: "price_id", quantity: 1, }, ], metadata: { id: 1, email: "soubhagya", }, mode: "payment", success_url: `https://www.youtube.com/?success=true`, cancel_url: `https://www.youtube.com/?canceled=true`, }); res.redirect(303, session.url); }) React frontend…

VIEW QUESTION

Reactjs – The requested module 'openai' does not provide an export named 'Configuration' error

I'm trying to build an AI image generating website using MERN and I got this error: The requested module 'openai' does not provide an export named 'Configuration'. file:///C:/Users/Rashmika%20Satish/ai_website/server/routes/dalleRoutes.js:3 import {Configuration, OpenAIApi} from 'openai'; ^^^^^^^^^^^^^ SyntaxError: The requested module 'openai' does…

VIEW QUESTION
Back To Top
Search