Closed
Description
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?
@sentry/nextjs
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
Metadata
Metadata
Assignees
Type
Projects
Status
No status