简体   繁体   English

找不到模块:无法解析“@stripe/react-stripe-js”

[英]Module not found: Can't resolve '@stripe/react-stripe-js'

import { loadStripe } from "@stripe/stripe-js";从“@stripe/stripe-js”导入{loadStripe}; import { Elements } from "@stripe/react-stripe-js";从“@stripe/react-stripe-js”导入{元素}; // also done with packages installation npm i @stripe/react-stripe-js and npm i @stripe/stripe-js // 也完成了包安装 npm i @stripe/react-stripe-js 和 npm i @stripe/stripe-js

Error showing./src/App.js Module not found: Can't resolve '@stripe/react-stripe-js' in 'E:\project错误显示./src/App.js 未找到模块:无法解析 'E:\project 中的 '@stripe/react-stripe-js'

enter image description here在此处输入图像描述

You haven't installed stripe.你还没有安装条纹。

make sure you have stripe in your package.json and run "npm i" in that directory.确保您的 package.json 中有条带并在该目录中运行“npm i”。 Then try again.然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM