webpack-cli: RangeError: Invalid string length

Describe the bug

I’ve started the migration to webpack@5 and from what I can summise it seems that the compilation is able to pretty much finish, but than it fails with following error.

By what the linked sources are about I’ve tried to set stats: false, however nothing changed.

What is the current behavior?

[webpack-cli] Promise rejection: RangeError: Invalid string length
[webpack-cli] RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at Compiler.compilerCallback (.yarn/$$virtual/webpack-cli-virtual-6b0393a6f7/0/cache/webpack-cli-npm-4.0.0-ccb32dab5d-6c693d4cc9.zip/node_modules/webpack-cli/lib/utils/Compiler.js:91:36)
    at .yarn/$$virtual/webpack-cli-virtual-6b0393a6f7/0/cache/webpack-cli-npm-4.0.0-ccb32dab5d-6c693d4cc9.zip/node_modules/webpack-cli/lib/utils/Compiler.js:110:46
    at .yarn/cache/neo-async-npm-2.6.2-75d6902586-34a8f53091.zip/node_modules/neo-async/async.js:2830:7
    at done (.yarn/cache/neo-async-npm-2.6.2-75d6902586-34a8f53091.zip/node_modules/neo-async/async.js:2865:11)
    at .yarn/cache/neo-async-npm-2.6.2-75d6902586-34a8f53091.zip/node_modules/neo-async/async.js:2818:7
    at .yarn/$$virtual/webpack-virtual-de8dd232be/0/cache/webpack-npm-5.0.0-72465b5b59-bbd9df6389.zip/node_modules/webpack/lib/HookWebpackError.js:69:3
    at Hook.eval [as callAsync] (eval at create (.yarn/cache/tapable-npm-2.0.0-1b1ecde87d-e6321280f9.zip/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (.yarn/cache/tapable-npm-2.0.0-1b1ecde87d-e6321280f9.zip/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (.yarn/$$virtual/webpack-virtual-de8dd232be/0/cache/webpack-npm-5.0.0-72465b5b59-bbd9df6389.zip/node_modules/webpack/lib/Cache.js:150:23)

To Reproduce

Hard to say really, but I’ll gladly collect and provide any further information when given pointers.

Please paste the results of webpack-cli info here, and mention other relevant information

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
    Memory: 7.94 GB / 31.29 GB
  Binaries:
    Node: 13.12.0 - /tmp/xfs-eeeb95f6/node
    Yarn: 2.1.1 - /tmp/xfs-eeeb95f6/yarn
    npm: 6.14.4 - ~/.virtualenvs/pool/bin/npm
  Browsers:
    Chrome: 84.0.4147.125
    Firefox: 81.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (11 by maintainers)

Most upvoted comments

@francescocaveglia yes, today/tomorrow

Fixed in master, hope release will be today, WIP on other issues

So…

  • the good one is that I’ve somehow managed to make a very minimal setup
  • the bad one is that the error is not there 🤦

On with the archeology then…

And I’ll try to whip-up something in the morning… It’s just that that the project is a complex tangle and it’s pretty late here…