WebpackError:找不到元素上下文;您需要将应用程序中调用 useStripe() 的部分包装在提供程序中
我正在使用 Stripe 为我正在开发的 gatsby 网站收集捐款。它使用 firebase 作为后端。我在当地成功接受了 Stripe 的捐赠。但是当我推送到 github 时出现 webpack 错误,因此我的更改将在我的实时 netlify 链接上。这是错误消息的一部分:
5:05:22 PM: success run queries - 80.938s - 42/42 0.52/s
5:05:30 PM: []
5:05:30 PM: failed Building static HTML for pages - 4.832s
5:05:30 PM: error Building static HTML failed for path "/contactDonate/"
5:05:30 PM: 197 | var parseElementsContext = function parseElementsContext(ctx, useCase) {
5:05:30 PM: 198 | if (!ctx) {
5:05:30 PM: > 199 | throw new Error("Could not find Elements …Run Code Online (Sandbox Code Playgroud)