You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sentry gets an error when using yarn berry.
There was no problem with the version of yarn 1.x.x, but there is a problem with berry.
When entering the page, the error Can't resolve '@sentry/utils/esm/buildPolyfills' appears.
This is not a bug in Yarn and is behaving as expected.
Something in your build pipeline is injecting unresolved imports to @sentry/utils which requires you to declare it as a dependency to access it.
Since that isn't a great developer experience the preferred solution is for the import to be resolved before getting injected.
Console output in debug mode:
$ PNP_DEBUG_LEVEL=1 yarn buildYour application tried to access @sentry/utils, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. In ← '@sentry/utils' In ← '/app/next-sentry-error-example/src/app/' In ← { considerBuiltins: false }
There was no problem with the version of yarn 1.x.x, but there is a problem with berry.
That's because Yarn 1.x hoists @sentry/utils so it's accessible to your project, Berry can do that as well if you run
Self-service
Describe the bug
Sentry gets an error when using yarn berry.
There was no problem with the version of yarn 1.x.x, but there is a problem with berry.
When entering the page, the error
Can't resolve '@sentry/utils/esm/buildPolyfills'
appears.To reproduce
Reproduction app
Environment
System: OS: macOS 13.3.1 CPU: (8) arm64 Apple M1 Pro Binaries: Node: 16.17.1 - /private/var/folders/0l/pfyzs64132zg_wwf69czqrnw0000gn/T/xfs-5036e623/node Yarn: 3.6.0 - /private/var/folders/0l/pfyzs64132zg_wwf69czqrnw0000gn/T/xfs-5036e623/yarn npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
Additional context
getsentry/sentry-javascript#8180
No response
The text was updated successfully, but these errors were encountered: