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.

buildDependencies not working as expected.

See original GitHub issue

Bug report

What is the current behavior?

See pull request here https://github.com/webpack/webpack.js.org/pull/4311

I’m requireing a file in webpack configuration, but change to requireed file doesn’t invalidate the cache as per https://github.com/webpack/changelog-v5/blob/master/guides/persistent-caching.md#build-dependencies.

Here’s the related configuration for cache:

  cache: {
    type: 'filesystem',
    buildDependencies: {
      config: [__filename],
    },
    cacheDirectory: path.resolve(__dirname, '.cache/webpack')
  },

If the current behavior is a bug, please provide the steps to reproduce.

  1. clone code from https://github.com/webpack/webpack.js.org/pull/4311
  2. run yarn then yarn fetch:supporters and yarn start
  3. open http://localhost:3000/api/cli/#configuration-options
  4. change - to * here https://github.com/webpack/webpack.js.org/pull/4311/files#diff-53da17d70729ef08abbe0bc80f4cf2a701f0447084bf69be87873f5a064512e4R13
  5. ctrl-c twice to stop dev server and run yarn start again
  6. refresh http://localhost:3000/api/cli/#configuration-options, you can find - still there while i was expecting *.

What is the expected behavior?

Right now I have to run rm -rf .cache/webpack to clean up the cache.

Other relevant information: webpack version: 5.10.1 Node.js version: 14.15.0 Operating System: macOS Big Sur Additional tools:

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
chenxsancommented, Dec 17, 2020

I’ve tested the code with the latest webpack and it works as expected now, I think the warning regarding Can't resolve 'webpack.dev.js' could be fixed in another webpack-cli release, hence I’m closing this issue.

0reactions
alexander-akaitcommented, Dec 16, 2020

Yep, fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppress very long webpack/Babel warning - Stack Overflow
The gist of it seems to be that Webpack is trying to resolve this: @babel/helper-compilation-targets/lib/filter-items. And, it expects it to ...
Read more >
Issue #12: Enable build dependency resolution - fedmod - Pagure.io
Build dependency resolution is currently disabled because it fails for grep , as the solver currently expects to be able to find all...
Read more >
How to Troubleshoot a Failed Easybuild Compilation
Step 1: Build Dependencies Separately, in Sequence. The first thing to try, is to build each dependency separately, in the sequence that they ......
Read more >
pip subprocess to install build dependencies did not run ... - You.com
So pip is trying to compile it from source. But as the error message says, VC 6.0 is not supported by this module....
Read more >
ProjectDependency added by Configuration ...
withDependencies has no buildDependencies ... at all but only throw syntax errors, it is hard to guess what your actual problem is or...
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