-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Verify Next.js canary release
- I verified that the issue exists in the latest Next.js canary release
Describe the bug
The server crashes on startup while trying to compile the instrumentation.ts file.
○ Compiling /instrumentation ...
⨯ ./instrumentation.ts
Error: × failed to invoke plugin on 'Some("/project/workspace/instrumentation.ts")'
[Error: An error occurred while loading instrumentation hook: Cannot find module '/project/workspace/.next/server/instrumentation'
Require stack:
- /project/workspace/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/dev/next-dev-server.js
- /project/workspace/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next.js
- /project/workspace/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/lib/start-server.js] {
code: 'MODULE_NOT_FOUND',
requireStack: [Array]
Expected behavior
The server to startup normally and the superjson plugin to function.
Reproduction link
https://codesandbox.io/p/devbox/festive-marco-874kzf?workspaceId=ws_UDh5PPYTfH5dS4grc4QC5V
Version
0.6.3
Config
{
reactStrictMode: true,
experimental: {
swcPlugins: [["next-superjson-plugin", {}]],
},
}Additional context
If you delete the instrumentation.ts file OR the superjson plugin line from next config, everything works normally.
MichaelCharles and simonknittel
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working