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.

WP5: Unexpected lazy element in stream

See original GitHub issue

Bug report

What is the current behavior?

  1. enable persistent cache in webpack config
  2. use webpack in custom dev server

when calling webpack(config), throw error Unexpected lazy element in stream.

i found the same issue but closed. issue#11661

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

The error can be reproduced with the following example.

    const config = {
        name: 'cache_test',
        entry: {},
        cache: {
            type: 'filesystem'
        }
    };
    const webpackCompiler = webpack(config);
Error: Unexpected lazy element in stream
    at readU8 (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\serialization\BinaryMiddleware.js:589:11)
    at BinaryMiddleware._deserialize (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\serialization\BinaryMiddleware.js:882:20)
    at BinaryMiddleware.deserialize (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\serialization\BinaryMiddleware.js:494:15)
    at Serializer.deserialize (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\serialization\Serializer.js:41:26)
    at PackFileCacheStrategy._openPack (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\cache\PackFileCacheStrategy.js:915:5)
    at new PackFileCacheStrategy (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\cache\PackFileCacheStrategy.js:887:27)
    at WebpackOptionsApply.process (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\WebpackOptionsApply.js:561:9)
    at createCompiler (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\webpack.js:81:28)
    at E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\webpack.js:44:48
    at Array.map (<anonymous>)
    at createMultiCompiler (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\webpack.js:44:33)
    at create (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\webpack.js:118:16)
    at webpack (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\webpack.js:151:32)
    at f (E:\JavaScript\wwmngnjlogic_2\vue_dev\webpack\node_modules\webpack\lib\index.js:55:16)

What is the expected behavior? the build should execute without error

Other relevant information: webpack version: 5.30.0 Node.js version: 14.16.1 Operating System: Windows Additional tools:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
alexander-akaitcommented, May 25, 2021

Note: Also you don’t need cache-loader for webpack v5, also parallel-webpack is not compatibility with webpack v5

0reactions
alexander-akaitcommented, May 27, 2021

Yes, you can send a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

WP5: Unexpected lazy element in stream · Issue #11661
This only occurs in development mode and looks related to the new caching structure. Error: Unexpected lazy element in stream at readU8 ...
Read more >
How to make your website load faster - FacetWP
Developers can assign each of these data streams a different weighted value, ... You can use plugins like a3 Lazy Load and Lazy...
Read more >
Untitled
Rough audio function live streaming, K-12 students in us, Incon tank sentinel ... Rajaa el bidaoui 2013, Pooran farrokhzad, Vitas the 7th element...
Read more >
Printing C:\DOCUME~1\...\FINALR~1\WL79.FRL - DTIC
critical components of the live video streaming software. ... strict, or lazy, evaluation strategy that is used in Haskell and O'Haskell.
Read more >
Getting to know - CHROMIC project
As mentioned, the aim of WP5 is to validate the identified metallurgical ... the stream coming out of a unit operation being the...
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