-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module @opentelemetry/instrumentation/hook.mjs
after upgrade to v8
#12114
Comments
I've managed to fix this but it still doesn't work with another error I don't know how to fix
|
Same issue when I upgraded to @sentry/astro v8 from my SSR Astro site on Netlify Functions No build errors, no type errors, just fails render at runtime. Tried 8.2.1, 8.2.0, 8.1.0 Only worked when I downgraded to 7.116.0 May 20, 11:06:20 AM: 60c44bc0 ERROR 16:06:24 [ERROR] Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/@opentelemetry/instrumentation/hook.mjs' imported from /var/task/node_modules/@sentry/astro/node_modules/@sentry/node/esm/sdk/init.js
May 20, 11:06:20 AM: 60c44bc0 ERROR at finalizeResolution (node:internal/modules/esm/resolve:269:11)
May 20, 11:06:20 AM: 60c44bc0 ERROR at moduleResolve (node:internal/modules/esm/resolve:937:10)
May 20, 11:06:20 AM: 60c44bc0 ERROR at moduleResolveWithNodePath (node:internal/modules/esm/resolve:1161:14)
May 20, 11:06:20 AM: 60c44bc0 ERROR at defaultResolve (node:internal/modules/esm/resolve:1204:79)
May 20, 11:06:20 AM: 60c44bc0 ERROR at nextResolve (node:internal/modules/esm/hooks:866:28)
May 20, 11:06:20 AM: 60c44bc0 ERROR at Hooks.resolve (node:internal/modules/esm/hooks:304:30)
May 20, 11:06:20 AM: 60c44bc0 ERROR at ModuleLoader.resolve (node:internal/modules/esm/loader:352:35)
May 20, 11:06:20 AM: 60c44bc0 ERROR at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
May 20, 11:06:20 AM: 60c44bc0 ERROR at ModuleLoader.import (node:internal/modules/esm/loader:322:34)
May 20, 11:06:20 AM: 60c44bc0 ERROR at Hooks.register (node:internal/modules/esm/hooks:165:51) |
hmm, this is weird - this should not happen, and we have some tests for this. One thing we can try is add some additional safeguards around this code to try to prevent it from failing - I'll do that, hopefully this helps! |
Not sure it will fix since I also had issues with vue server renderer but we'll see |
Installed 8.7.0 today and everything seems to work fine. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
8.2.1
Framework Version
Vue 3.4.27 (Nuxt 3.11.2)
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
@sentry/vue
and@sentry/node
from 7.116.0 to 8.2.1Expected Result
It should not break the deployment and import everything correctly in the build.
Actual Result
Not sure where the
@sentry/node
usage comes from since it is only used in a Nitro route that is not called during SSR. But perhaps the entire build is just broken.The text was updated successfully, but these errors were encountered: