I have a Laravel React Inertia js typescript project. i installed the @stripe/stripe-js for that. its already work but i did npm update command and then display this issue
Build Frontend Production Assets 20240306104407667 Building the app using npm run build ...
build tsc && vite build && vite build --ssr
node_modules/@stripe/react-stripe-js/dist/react-stripe.d.ts(704,55): error TS2724: '"/("My project url and location)/releases/20240306104407667/node_modules/@stripe/stripe-js/dist/index"' has no exported member named 'StripeCustomCheckoutActions'. Did you mean 'StripeCustomCheckoutOptions'?
how to solve that?
my node version is v18.15.0 npm version is 9.5.0
this is my package json versions
"@stripe/react-stripe-js": "^2.5.1", "@stripe/stripe-js": "^3.0.7",
"devDependencies": {
"@headlessui/react": "^1.7.15",
"@inertiajs/react": "^1.0.0",
"@tailwindcss/forms": "^0.5.3",
"@types/node": "^18.13.0",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.10",
"@types/react-helmet": "^6.1.6",
"@types/supercluster": "^7.1.3",
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.12",
"axios": "^1.6.4",
"laravel-vite-plugin": "^1.0.0",
"postcss": "^8.4.31",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.2.1",
"typescript": "^5.0.2",
"vite": "^5.0.0"
},
i try to downgrade stripe-js versions but it not work
I try to down version of @stripe/stripe-js to 3.0.6 and @stripe/react-stripe-js to 2.5.0 and it work for me. The problem maybe is the conflict between two version of two library above.