Skip to content

Catch webpack failures #864

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Catch webpack failures #864

wants to merge 1 commit into from

Conversation

onigoetz
Copy link
Contributor

Hi,

I'm using fork-ts-checker-webpack-plugin along with eslint-webpack-plugin.

The latest version of eslint-webpack-plugin now throws an error when linting errors are found; which looks like this in the console:

[22:04:03] Starting 'js_myTSBundle' ...

  Failed to compile.

[22:04:04] 'js_myTSBundle' errored after 727 ms
[22:04:04]  
/Users/onigoetz/Sites/Libs/crafty/packages/integration/fixtures/crafty-preset-typescript-webpack/invalid-forked/js/typescript.ts
  19:9   error  Unexpected alert                    no-alert
  20:1   error  Delete `··`                         @swissquote/swissquote/prettier/prettier

✖ 18 problems (16 errors, 2 warnings)
  13 errors and 0 warnings potentially fixable with the `--fix` option.

[22:04:04] 'js' errored after 728 ms
[22:04:04] 'default' errored after 730 ms
Issues checking service aborted - probably out of memory. Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.
If increasing the memory doesn't solve the issue, it's most probably a bug in the TypeScript.

I get a warning by ForkTsCheckerWebpackPlugin that it may be a memoryLimit error even though it's due to the linting error above.

I don't know how to approach fixing this so this PR is an attempt at it; catch a failed hook from webpack and avoid printing the error if that's the case.

I don't know how to test this and I don't know if this approach actually prevents the intended use case which is to detect out of memory and print an informative message. I'd appreciate guidance so that we can find a way to print the message only when relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant