You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but running into the following error when the endpoint is triggered:
- error TypeError: stripe__WEBPACK_IMPORTED_MODULE_1__.default is not a constructor
at POST (webpack-internal:///(rsc)/./app/api/webhooks/stripe/route.ts:11:20)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:43)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/trace/tracer.js:111:36)
at NoopContextManager.with (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:26:19)
at ContextAPI.with (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/api/context.js:55:46)
at NoopTracer.startActiveSpan (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js:60:31)
at ProxyTracer.startActiveSpan (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js:36:24)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/trace/tracer.js:100:107)
at NoopContextManager.with (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:26:19)
at ContextAPI.with (webpack-internal:///(rsc)/./node_modules/@opentelemetry/api/build/src/api/context.js:55:46)
at NextTracerImpl.trace (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/trace/tracer.js:100:32)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:242:53)
at AsyncLocalStorage.run (node:async_hooks:330:14)
at Object.wrap (webpack-internal:///(rsc)/./node_modules/next/dist/server/async-storage/static-generation-async-storage-wrapper.js:42:24)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:196:97)
at AsyncLocalStorage.run (node:async_hooks:330:14)
at Object.wrap (webpack-internal:///(rsc)/./node_modules/next/dist/server/async-storage/request-async-storage-wrapper.js:82:24)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:195:75)
at AsyncLocalStorage.run (node:async_hooks:330:14)
at AppRouteRouteModule.execute (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:192:56)
at AppRouteRouteModule.handle (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:315:41)
at doRender (/Users/filippkramer/work/careerstudio/node_modules/next/dist/server/base-server.js:1091:56)
at cacheEntry.responseCache.get.incrementalCache.incrementalCache (/Users/***/node_modules/next/dist/server/base-server.js:1300:34)
at /Users/filippkramer/work/careerstudio/node_modules/next/dist/server/response-cache/index.js:99:42
at ResponseCache.get (/Users/filippkramer/work/careerstudio/node_modules/next/dist/server/response-cache/index.js:149:11)
at DevServer.renderToResponseWithComponentsImpl (/Users/filippkramer/work/careerstudio/node_modules/next/dist/server/base-server.js:1219:53)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
This may be a NextJS/config issue, but need a second pair of eyes.
Also, I saw this issue posted previously #1000, but it was closed due to inactivity. So, resurfacing.
Hi @fvkramer can you please provide a smaller repro? It's very hard to debug issues like this without an actual project, webpack config, etc. I'd recommend checking webpack config to see if any unintended transformations are happening.
Somehow this conflicts with the stripe package. That config rule I added because I'm using a pdf rendering library, and needed this in my webpack. I'm not sure why it conflicts, but removing those lines solves the above issue.
There is a file called stripe.node.js in the package. Looks like that rule matches is and breaks Stripe's module loading. There was another customer reporting a similar issue, consider reusing their solution: #1896 (comment)
Describe the bug
I'm adding stripe integration into a NextJS 13.4+ app.
I have an endpoint that looks like this:
but running into the following error when the endpoint is triggered:
This may be a NextJS/config issue, but need a second pair of eyes.
Also, I saw this issue posted previously #1000, but it was closed due to inactivity. So, resurfacing.
To Reproduce
Node Version: 18.12.0
Package.json:
tsconfig.json
Expected behavior
Stripe instance should be instantiated without problems.
Code snippets
No response
OS
macOS
Node version
Node V18.12.0
Library version
14.1.0
API version
Latest
Additional context
No response
The text was updated successfully, but these errors were encountered: