Replies: 5 comments 2 replies
-
|
In what way did it not work in production mode? |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
I can say more - instrumentation-client.ts - does not run in SRC folder. |
Beta Was this translation helpful? Give feedback.
-
|
I found out that | Root directory structure
├── src <-- The source code for your service.
└── pages <-- The source code for Next.js [pages](https://nextjs.org/docs/basic-features/pages) routing.
└── instrumentation[-client].ts <-- Instrumentation hooks for client-side and server-side.| Root directory structure
├── src <-- The source code for your service.
|── pages <-- The source code for Next.js [pages](https://nextjs.org/docs/basic-features/pages) routing.
|── instrumentation[-client].ts <-- Instrumentation hooks for client-side and server-side. |
Beta Was this translation helpful? Give feedback.
-
|
Incredible how it still works in dev but not in prod. And there is no clear message stating this if I'm not mistaken. But thanks for the solution! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hey folks, I'm fairly new to this node stack. In trying to set up Sentry's Next.js integration, it worked fine in development (
next dev), but not in production mode (next start).If I move the file to the project root,
next startdoes load it. Any ideas why?Additional information
https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation
Based on this, I did confirm that the
instrumentationHookexperiment is indeed showing enabled.Beta Was this translation helpful? Give feedback.
All reactions