Skip to content
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

Failed build succeeds on rerun using cache #18368

Open
dnillovna opened this issue Apr 29, 2024 · 0 comments
Open

Failed build succeeds on rerun using cache #18368

dnillovna opened this issue Apr 29, 2024 · 0 comments

Comments

@dnillovna
Copy link

Bug report

What is the current behavior?

My build runs: npm run build
On the first run, it fails. A file in dependency has a typescript error, causing the build to fail.
When I try to rerun it, it succeeds.
When I turn off the cache, it fails every time.

Example package to reproduce: https://github.com/dnillovna/webpack-cache-fail.git

What is the expected behavior?

Failed builds should not create a cache that can be used for future builds. When cache is enabled, the build with errors should fail every time instead of only on the first attempt.

Other relevant information:

webpack version:

webpack: latest => 5.91.0
webpack-cli: latest => 5.1.4

Node.js version:

Node: 21.6.1 - /opt/homebrew/opt/node/bin/node
npm: 10.2.4 - /opt/homebrew/opt/node/bin/npm

Operating System:

OS: macOS 13.6.2
CPU: (8) arm64 Apple M1 Pro
Memory: 100.47 MB / 32.00 GB

Additional tools:
None

I got the information using npm run version-info, which executes webpack --version.

I found a similar issue for the other webpack cache plugin: mzgoddard/hard-source-webpack-plugin#507

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

No branches or pull requests

1 participant