-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Description
Some users reported errors related to @sentry/nextjs not being resolved correctly in Cloudflare Workers runtime.
✘ [ERROR] Could not resolve "@sentry/nextjs"
.open-next/server-functions/default/.next/server/app/sentry-example-page/page.js:2:9038:
2 │ ...ve().then(c.bind(c,70704))},77134:a=>{"use strict";a.exports=require("@sentry/nextjs")},80764:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=...
╵ ~~~~~~~~~~~~~~~~
The module "./build/cjs/edge/index.js" was not found on the file system:
.open-next/server-functions/default/node_modules/@sentry/nextjs/package.json:39:19:
39 │ "require": "./build/cjs/edge/index.js",
Workaround
@dispalt reported that the following workaround fixes it:
const nextConfig = {
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
outputFileTracingIncludes: {
"*": ["node_modules/@sentry/nextjs/build/**/*"],
},
// ...
}User Reports:
- Support Next.js on Cloudflare Workers (OpenNext) #14931 (comment)
- Support Next.js on Cloudflare Workers (OpenNext) #14931 (comment)
- Support Next.js on Cloudflare Workers (OpenNext) #14931 (comment)
I didn't manage to reproduce this at all, but it could be something with NFT or specific configurations.