Sapphire "no such file or directory" error

I know I like to only have weird bugs, but this is a new level even for me. Updating @sentry/node from ^7.114.0 to ^8.0.0 causes the following error in Sapphire on startup (not just for messageUpdate, for loads of other files as well):
Error when loading '/app/dist/listeners/messageUpdate.js': [Error: ENOENT: no such file or directory, open '/app/node_modules/@sapphire/framework/dist/esm/@sapphire/result'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/app/node_modules/@sapphire/framework/dist/esm/@sapphire/result'
}
Error when loading '/app/dist/listeners/messageUpdate.js': [Error: ENOENT: no such file or directory, open '/app/node_modules/@sapphire/framework/dist/esm/@sapphire/result'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/app/node_modules/@sapphire/framework/dist/esm/@sapphire/result'
}
Any ideas? Is this likely an upstream issue?
8 Replies
Fozzie
FozzieOP•8mo ago
I haven't changed my build system, it's just the update to the package which has changed https://github.com/FozzieHi/FormulaOne/blob/main/Dockerfile
GitHub
FormulaOne/Dockerfile at main · FozzieHi/FormulaOne
The Formula One Discord Bot for the r/formula1 Discord Server - FozzieHi/FormulaOne
Fozzie
FozzieOP•8mo ago
Here's the diff, it might not necessarily be sentry but one of the other packages included in the update https://github.com/FozzieHi/FormulaOne/pull/782/files
GitHub
Bump @sentry/node from 7.114.0 to 8.0.0 by dependabot[bot] · Pull R...
Bumps @sentry/node from 7.114.0 to 8.0.0. Release notes Sourced from @​sentry/node's releases. 8.0.0 The Sentry JS SDK team is proud to announce the release of version 8.0.0 of Sentry&...
Fozzie
FozzieOP•8mo ago
The path doesn't exist, but interestingly it doesn't exist on either version, so is it meant to be imported at all?
No description
UndiedGFX
UndiedGFX•8mo ago
1) that file shouldn't exist 2) was updating @sentry/node the issue?
Favna
Favna•8mo ago
Seems to me like sentry is resolving paths incorrectly.
Fozzie
FozzieOP•8mo ago
It's weird because I don't think sentry should be changing imports at all, maybe with its source mapping? But then I thought that was handled by TypeScript itself. I'll keep digging but it's weird that it only errors with Sapphire Obviously the major version bump for sentry is a red flag, but then it also includes a lot more packages as well
Fozzie
FozzieOP•8mo ago
Well there's a possible match now on the issues page, interestingly I don't get it for discord.js though 😂 https://github.com/getsentry/sentry-javascript/issues/12059
GitHub
Node SDK generating Error: ENOENT in v8 · Issue #12059 · getsentry/...
Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Want results from more Discord servers?
Add your server