Search code examples
javascriptnode.jstypescriptstripe-paymentsstrapi

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


I’m attempting to integrate Stripe with Strapi. I have this line of code in my project:

const stripe = require(“stripe”)(“secret-key”);

However, I’m encountering an error message that says, ‘This expression is not callable. Type ‘typeof import(“stripe”)’ has no call signatures.’ Can you please help me identify and fix the issue to resolve this error?"

*I’m using javaScript not TypeScript


Solution

  • I found that I have experienced a temporary issue with my development environment, specifically Visual Studio, which sometimes show errors in code that aren't really there. The fact that the error disappeared after a while is a strong indicator that it might have been a temporary glitch or confusion in my code editor.