#aced0001

1 messages · Page 1 of 1 (latest)

silent flameBOT
restive apex
#

hi! what's the problem exactly?

wet sorrel
#

("use strict");
// import Stripe from "stripe";
// const stripe = new Stripe(process.env.STRIPE_KEY,
// {
// apiVersion: "2023-08-16"
// });
const stripe = require('stripe')(process.env.STRIPE_KEY);

/**

  • order controller
    */

const { createCoreController } = require("@strapi/strapi").factories;

#

this is the code snippet

#

and this is the problem

#

This expression is not callable.
Type 'typeof import("stripe")' has no call signatures.

#

the commented part is another method I tried to use stripe but then I got a error while trying to run the server by 'npm run develop' where the server couldn't be connected because "import statement can't be used outside a module"

versed river
wet sorrel
#

I don't have typescript enabled will that cause problems?

versed river
#

No this has no link to Typescript or not

wet sorrel
#

oh ok will check it out thank you