sentry-javascript: Incorrect `NEXTJS_REQUEST_ASYNC_STORAGE_MODULE_PATH` in Next.js 13.4.20
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
SDK Version
7.68.0
Framework Version
13.4.20
Link to Sentry event
No response
SDK Setup
npx @sentry/wizard@latest -i nextjs
Steps to Reproduce
- Install the Next.js canary release (
yarn add next@13.4.20-canary.20) in a project using the Next.js 13 App Directory and Route Handlers. - Implement the Sentry plugin in
next.config.js. - Run
next build. - Observe a console warning:
The Sentry SDK could not access the RequestAsyncStorage module. Certain features may not work. There is nothing you can do to fix this yourself, but future SDK updates may resolve this. - Observe an error when building each route handler wrapped by Sentry:
Module not found: Can't resolve '@sentry/nextjs/build/esm/config/templates/requestAsyncStorageShim.js'
Expected Result
Next.js should successfully build all Route Handlers wrapped by Sentry
Actual Result
Identified the offending line in packages/nextjs/src/config/loaders/wrappingLoader.ts#L19, which should use next/dist/client/components/request-async-storage.external
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 2
- Comments: 19 (5 by maintainers)
Just updated to
Next.js 13.5.1with SDK Version7.69.0& I receive the error:This issue doesn’t seem to occur when I remove Sentry. Does everybody else experience this issue?