question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compilation error after upgrading to @sentry/react 7.1.0

See original GitHub issue

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 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
AbhiPrasadcommented, Jun 7, 2022

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.

0reactions
vladanpaunoviccommented, Jun 8, 2022

Hey folks, we released a fix in 7.1.1.

Thanks, @AbhiPrasad and @lobsterkatie for fixing this!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found