The nextjs-16 e2e app fails to build with Turbopack on next@16.4.0-canary.39:
./node_modules/sentry/dist/index.d.cts
Error: Specified module format (CommonJs) is not matching the module format of the source code (EcmaScript Modules)
Cause: our Turbopack loaders (componentAnnotationLoader, valueInjectionLoader, moduleMetadataInjectionLoader) import from @sentry/bundler-plugins/core. That entry point also loads the sentry CLI package. The canary follows the loaders' imports into the CLI package and tries to compile its TypeScript type file (index.d.cts) as code.
Compiling a type file as code is a bug in the Next.js canary, but the loaders only need two small helpers and shouldn't load the CLI at all. The stable Next.js release isn't affected.
The
nextjs-16e2e app fails to build with Turbopack onnext@16.4.0-canary.39:Cause: our Turbopack loaders (
componentAnnotationLoader,valueInjectionLoader,moduleMetadataInjectionLoader) import from@sentry/bundler-plugins/core. That entry point also loads thesentryCLI package. The canary follows the loaders' imports into the CLI package and tries to compile its TypeScript type file (index.d.cts) as code.Compiling a type file as code is a bug in the Next.js canary, but the loaders only need two small helpers and shouldn't load the CLI at all. The stable Next.js release isn't affected.