-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Electron-React ;npm run package' throws a Token error, unable to package. #805
Comments
Hi, this looks like a bug in your webpack configuration. There is indeed a syntax error in the output in the terminal but this is not code that is in our npm package. Please check that you don't have webpack plugins that do anything funky. |
@lforst thanks for swift reply. I will have a look. This only happens after I've installed sentry, for reference. |
We have an |
@timfish yep used as reference, works fine in dev. It's on package it fails |
As far as I can see, the package script just runs the build and then runs Electron builder to package the app. It looks like the following error comes from this code:
Our ERB example does not use Next.js. Do you have an example repository showing exactly the code you are trying to compile? If you're using Next.js, how are you using the server side stuff with Electron? |
Hi @timfish
This is definitely a bandaid solution I assume as we would like to be exposed to all new versions of sentry. The above change is in express.js from the sentry files |
@finnlaymfarmor is this happening when you run our example without making any changes or in your own setup? |
Hi I'm working with @finnlaymfarmor. Your build seems to work with npm run build. We are attempting npm run package per the ERB boilerplate. Sentry installed with the wizard using webpack config as prompted. I can't see anything related to sentry in your webpack config files, which method of installation have you used? Thanks. |
@ofarnill What exact wizard did you use to set up Sentry? The examples were last touched 2 years ago and the wizard most certainly is newer than that. |
The wizard will not set up the entire SDK for you, just how to upload sourcemaps for a given setup. I honestly 100% think this not an issue within the SDK, our Wizard, or the example, but rather a webpack bug. getsentry/sentry-javascript#10048 reports a similar issue. Would you mind raising this over at https://github.com/webpack/webpack? Thank you! |
Have opened an issue over at webpack. Will let you know if resolved. Thanks for your help. |
Closing for clean-up. Please open a new issue if this still applies. Thanks! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Electron SDK Version
4.15.1
Electron Version
25.0.1
What platform are you using?
Windows
Link to Sentry event
No response
Steps to Reproduce
We are using electron-react-boilerplate. Have only setup sentry for main.ts to replicate this.
Expected Result
Application to package.
For reference, the setup sentry.init works in development environment, but cannot seem to package into a production environment .
Actual Result
npm run package
The text was updated successfully, but these errors were encountered: