Closed rdadoune closed 3 years ago
Thanks for the bug report. I can't remember why I used a relative import but there are more in the PR that you linked. Do you think all of them would have the same problem?
Yeah, but only for relative imports that reach outside the scope of the package.
π bug report
Affected Package
The issue is caused by package @airbrake/node ### Is this a regression?Yes. Looks like this bug was introduced ~6 months ago here: https://github.com/airbrake/airbrake-js/commit/78387b647b7fa2cd89b738171a1999ac29c989eb#diff-ee255d4819b7e98c3487cb7f6feb2964841189ce14b06654ea25507701df053b
Description
This relative import breaks Yarn 2 Plug'n'Play. Plug'n'Play doesn't use a traditional directory structure and instead uses a virtual file system so a reference to
../../browser
is outside the scope of@airbrake/node
and throws an error because it doesn't exist (each package is not in the samenode_modules
folder).https://github.com/airbrake/airbrake-js/blob/753c59c950a5d8e3ecc47dda8c40244419778269/packages/node/src/notifier.ts#L1-L2
π¬ Minimal Reproduction
https://gist.github.com/...π₯ Exception or Error
π Your Environment
@airbrake/* version:
Anything else relevant?
This issue specifically affects installations with Yarn 2 Berry pnp.