Compilation error after upgrading to @sentry/react 7.1.0
See original GitHub issueIs 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 the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.1.0
Framework Version
18.1.0
Link to Sentry event
No response
Steps to Reproduce
Upgrade from 7.0.0
to 7.1.0
Expected Result
Successful compilation.
Actual Result
Compilation error -
Compiling...
Compilation failed:
ModuleNotFoundError: Module not found: Error: Can't resolve 'cookie' in '/tmp/build_0b2ca099/node_modules/@sentry/utils/esm'
at /tmp/build_0b2ca099/node_modules/webpack/lib/Compilation.js:925:10
at /tmp/build_0b2ca099/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /tmp/build_0b2ca099/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /tmp/build_0b2ca099/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /tmp/build_0b2ca099/node_modules/neo-async/async.js:2830:7
at /tmp/build_0b2ca099/node_modules/neo-async/async.js:6877:13
at /tmp/build_0b2ca099/node_modules/webpack/lib/NormalModuleFactory.js:214:25
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:213:14
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:43:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:30:40
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/forEachBail.js:30:14
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /tmp/build_0b2ca099/node_modules/enhanced-resolve/lib/RootPlugin.js:37:38
at _next43 (eval at create (/tmp/build_0b2ca099/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
resolve 'cookie' in '/tmp/build_0b2ca099/node_modules/@sentry/utils/esm'
Parsed request is a module
using description file: /tmp/build_0b2ca099/node_modules/@sentry/utils/package.json (relative path: ./esm)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Troubleshooting for React - Sentry Documentation
If you update your Sentry SDK to a new major version, you might encounter breaking changes that need some adaption on your end....
Read more >@sentry/react | Yarn - Package Manager
7.27.0. This release exports the Session Replay integration via @sentry/browser and all framework SDKs building on top of it. Going forward, the @sentry/replay ......
Read more >failed to resolve plugin for module "sentry-expo" - You.com
This is likely a dependency management issue. In my case I was attempting to use yarn "pnp" which which doesn't support react-native at...
Read more >Managed EAS iOS build fails on Glob (pod install)
I got this far when encountering this pod install problem I'm stumped ... (7.1.0) Installing React (0.64.3) Installing React-Core (0.64.3) ...
Read more >Update dependency @sentry/browser to v7 - GitLab.org
An error occurred while fetching the assigned milestone of the selected merge_request. Update dependency @sentry/browser to v7.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems like https://github.com/getsentry/sentry-javascript/pull/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.
Hey folks, we released a fix in 7.1.1.
Thanks, @AbhiPrasad and @lobsterkatie for fixing this!