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.

Electron React Boilerplate support out-of-the-box

See original GitHub issue

A popular starter project for Electron, Electron React Boilerplate (1/5 Github stars as Electron repo), doesn’t work with sentry out of the box https://github.com/electron-react-boilerplate/electron-react-boilerplate

In main process, replacing sentry-election with sentry-node, packaging works. So it seems like an issue in sentry-election.

The run-time error using import * as Sentry from '@sentry/electron/main'

[1] npm run build:renderer exited with code 0
[0] ERROR in ./node_modules/@sentry/electron/preload/index.js
[0] Self-reference dependency has unused export name: This should not happen
[0]  @ ./node_modules/@sentry/electron/main/integrations/preload-injection.js 40:18-59
[0]  @ ./node_modules/@sentry/electron/main/integrations/index.js 13:26-56
[0]  @ ./node_modules/@sentry/electron/main/index.js 7:59-84
[0]  @ ./src/main/main.ts 39:28-60
[0] 
[0] ERROR in ./node_modules/@sentry/electron/preload/legacy.js
[0] Self-reference dependency has unused export name: This should not happen
[0]  @ ./node_modules/@sentry/electron/main/integrations/preload-injection.js 39:18-60
[0]  @ ./node_modules/@sentry/electron/main/integrations/index.js 13:26-56
[0]  @ ./node_modules/@sentry/electron/main/index.js 7:59-84
[0]  @ ./src/main/main.ts 39:28-60
[0] 
[0] webpack compiled with 2 errors

The run-time error using import * as Sentry from '@sentry/electron'

A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: e.require is not a function
    at i (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:97116)
    at t.getIntegrations (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:49966)
    at Object.2549 (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:49159)
    at r (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:888475)
    at Object.5533 (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:592804)
    at r (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:888475)
    at /tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:889145
    at Object.<anonymous> (/tmp/.mount_NiceNoWXQ3Jr/resources/app.asar/dist/main/main.js:2:889175)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
timfishcommented, Mar 26, 2022

Thanks for opening an issue, I’ll take a look!

1reaction
amilajackcommented, Mar 25, 2022

I should note I only tested this on 2.5.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tell me how you're using electron-react-boilerplate #1106
Getting an idea of how people are using the boilerplate can help me correctly prioritize features based how people are using the boilerplate....
Read more >
Styling | Electron React Boilerplate
Electron React Boilerplate supports CSS, SCSS, CSS and modules out of the box.
Read more >
Electron React Boilerplate - Amila Welihinda
Packaging: Out of the box support for packaging apps to Windows, Mac, and Linux; Compilation: Out of the box support for Babel and...
Read more >
Electron React Boilerplate - Awesome Stacks
A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box. Resources. Electron...
Read more >
Electron-forge vs. electron-react-boilerplate - LogRocket Blog
In this article, you can take a look at boilerplates for desktop applications using React and Electron to compare use cases.
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