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.

Packaging succeeds despite Webpack compilation errors

See original GitHub issue
  • [ x] I have read the contribution documentation for this project.
  • [x ] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

If Webpack compilation has errors (e.g. due to typescript compilation), both electron-forge start and electron-forge package scripts succeed without any warnings.

In case of electron-forge package, no files are emitted as noEmitOnErrors plugin is set up. The command should fail and display the errors.

For electron-forge start, files are emitted as they should be, but the webpack compilation errors should be displayed.

Here’s a repo with the setup: https://github.com/tgds/electrong-forge-webpack-typescript

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
MarshallOfSoundcommented, Feb 26, 2019

@tgds This was opened yesterday --> https://github.com/electron-userland/electron-forge/issues/703

I hacked a bit on it last night, it’s a tough one to solve, I think I’m on a track to a generic enough hack though that might work 😆

It’s tough to solve without externals (and I really want to avoid using externals as it defeats the purpose of bundling all JS)

1reaction
jrobesoncommented, Feb 8, 2019

The webpack plugin can start and fail, leaving you with this

Webpack Output Available: http://localhost:9000

Error launching app
Unable to find Electron app at /path/to/app

Cannot find module '/path/to/app'

and by the time you get there, the http server has already closed itself out, so you don’t even know if you’re say… missing ts-loader. I couldn’t get my app to start, because I didn’t know enough about webpack to know I needed it. I had to use @tgds’s example repo to find out.

NOTE: I’m only using webpack at all because electron-compile seems unmaintained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging succeeds despite Webpack compilation errors #579
If Webpack compilation has errors (e.g. due to typescript compilation), both electron-forge start and electron-forge package scripts succeed ...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
Webpack resolve compiles, but errors in the browser
I added resolve to my webpack.config and it was fine. Webpack compiled and everything is gravy, until I load the browser, where I...
Read more >
Troubleshooting - SurviveJS
Using webpack can lead to a variety of runtime warnings or errors. Often a particular part of the build fails for a reason...
Read more >
Compiler Hooks | webpack
This hook allows you to do a one more additional pass of the build. failed. SyncHook. Called if the compilation fails. Callback Parameters:...
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