waitFor can only be called for an already started item
See original GitHub issueBug report
Actual Behavior
When using watch, the build fails after the first successful build (whenever you change the css).
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
Error: waitFor can only be called for an already started item
at AsyncQueue.waitFor (./node_modules/webpack/lib/util/AsyncQueue.js:180:5)
at ./node_modules/webpack/lib/Compilation.js:4621:25
at processQueue (./node_modules/webpack/lib/util/processAsyncTree.js:50:4)
at processTicksAndRejections (node:internal/process/task_queues:78:11)
Expected Behavior
The build should succeed.
How Do We Reproduce?
When upgrading from 2.3.0 to 2.4.0 this issue was introduced for me.
This is my webpack config (nothing special I guess):
{
test: /\.scss$/,
include: [path.resolve(__dirname, 'app/Resources/scss')],
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {},
},
{
loader: 'css-loader',
options: {},
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: {
sassOptions: {
includePaths: [path.resolve(__dirname, 'node_modules')],
},
},
},
],
},
Please paste the results of npx webpack-cli info
here, and mention other relevant information
System:
OS: macOS 11.6
CPU: (8) arm64 Apple M1
Memory: 138.34 MB / 16.00 GB
Binaries:
Node: 16.9.1 - ~/.nvm/versions/node/v16.9.1/bin/node
npm: 7.21.1 - ~/.nvm/versions/node/v16.9.1/bin/npm
Packages:
babel-loader: ^8.2.2 => 8.2.2
copy-webpack-plugin: ^9.0.1 => 9.0.1
css-loader: 6.1.0 => 6.1.0
css-minimizer-webpack-plugin: 3.0.2 => 3.0.2
postcss-loader: 6.1.1 => 6.1.1
replace-in-file-webpack-plugin: ^1.0.6 => 1.0.6
sass-loader: ^12.2.0 => 12.2.0
webpack: 5.58.1 => 5.58.1
webpack-cli: 4.9.0 => 4.9.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Error: wait.for can only be called inside a fiber - Stack Overflow
I have 2 scipts almost identical with a cascade of function calls nested in a fiber. This one (parsing Tx in a blockchain)...
Read more >WAITFOR (Transact-SQL) - SQL Server - Microsoft Learn
While executing the WAITFOR statement, the transaction is running and no other requests can run under the same transaction. The actual time ...
Read more >Testing-library: avoid these mistakes in async tests
As waitFor is non-deterministic and you cannot say for sure how many times it will be called, you should never run side-effects inside...
Read more >Loader Interface - webpack
A single result can be returned in sync mode. For multiple results the this.callback() must be called. In async mode this.async() must be...
Read more >threading — Thread-based parallelism — Python 3.11.1 ...
Changed in version 3.7: This module used to be optional, it is now always ... Once a thread object is created, its activity...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Confirmed that this has been fixed after upgrading to
webpack@5.59.0
(https://github.com/webpack/webpack/issues/14484)@akphi Yep, the same problem, we will try to fix it in Monday