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.

Build not getting cancelled when webpack fails to compile the file

See original GitHub issue

I am not really sure if this is an error with our configuration, karma, karma-webpack or webpack 😄

We are compiling cjsx (coffee and jsx) files using webpack and then run our tests using jasmine. Everything is working fine as long as you do not have a syntax error in your coffee file. At that point the tests just run using an outdated version of our code, which often means they just stay green 😃. With webpack being quieted this does not result in any output and even if you output the error it can easily be overlooked because of the test run afterwards (which scrolls the error out of my terminal).

I would expect the tests to not be run and an error output to the displayed in karma.

Is this an issue that should be fixed here in the plugin or should this work out of the box and I am just too stupid to configure karma-webpack.

I already tried implementing this using failed callback of webpack. Is this the way to go here? I will try some more after work.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:23 (1 by maintainers)

github_iconTop GitHub Comments

43reactions
aldencoleraincommented, Sep 20, 2017

@d3viant0ne I don’t think this issue should be closed or is resolved. These plugins are workarounds. Tests should not run/pass if the code doesn’t build. If your using karma start it will fail to build, karma’s connection to the browser will timeout, and karma just sits there not exiting and not running tests.

8reactions
mvgijsselcommented, Mar 10, 2016

I’ve created another plugin which also prevents Karma from hanging https://gist.github.com/mvgijssel/d3b121ad50e34c09a124

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build not getting cancelled when webpack fails to compile the ...
We are compiling cjsx ( coffee and jsx ) files using webpack and then run our tests using jasmine. Everything is working fine...
Read more >
webpack --watch isn't compiling changed files - Stack Overflow
Show activity on this post. I tried running webpack --watch and after editing my JS files, it doesn't trigger an auto-recompilation.
Read more >
The best webpack configurations for React applications
If you've struggled to configure webpack for your React app, look no further. We cover both generic and specific config needs.
Read more >
Bundling Applications with Webpack - AWS SDK for JavaScript
Running Webpack. To build an application to use webpack, add the following to the scripts object in your package.json file.
Read more >
Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack.
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