-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Compilation error after upgrading to @sentry/react 7.1.0 #5222
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
Comments
I am facing a similar issue: $ CI=true REACT_APP_RELEASE=$(npx sentry-cli releases propose-version) react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'url' in '/redacted/node_modules/@sentry/utils/esm'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "url": false }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code exit status 1 |
Hey folks, thanks for writing in! We're investigating the issue and we'll update as soon as we can! |
It seems like #5190 added node.js imports, which don't exist in a browser context. I'm surprised though that our Playwright integration tests didn't catch these. For the time being, we're going to revert the above PR and cut a release to unblock you folks. |
@AbhiPrasad #5190 adds the But it causes other issues with projects that use I suggest having it as a normal dependency instead... |
Hey folks, we released a fix in 7.1.1. Thanks, @AbhiPrasad and @lobsterkatie for fixing this! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/react
SDK Version
7.1.0
Framework Version
18.1.0
Link to Sentry event
No response
Steps to Reproduce
Upgrade from
7.0.0
to7.1.0
Expected Result
Successful compilation.
Actual Result
Compilation error -
The text was updated successfully, but these errors were encountered: