Open nikhilgoswami opened 1 month ago
Hello, the first thing i noticed after some experimenting is that i can make mongoose work by removing the instrumentationHook option from next.config.js and using connect() in you route handler instead. So there is something going on how instrumentation.ts is working with --turbo and instrumentationHook
@nikhilgoswami Are you seeing any errors in your terminal/console?
Please make sure to try next@canary
first: https://github.com/nikhilgoswami/mongoose-error-on-turbo/blob/main/mongoose-turbo/package.json#L13
If you're still running into trouble let us know 🙏
Link to the code that reproduces this issue
https://github.com/nikhilgoswami/mongoose-error-on-turbo.git
To Reproduce
In a project connect to db run project with yarn dev in postman run api post localhost:3000/api/example mongoose stops working if you remove --turbo mongoose starts working again
Current vs. Expected behavior
mongoose should work with turbo
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
No response