Compilation fails with Webpack 4.2.0 when using `au run` through the CLI.
See original GitHub issueI’m submitting a bug report
- Library Version: 0.33.1
Please tell us about your environment:
-
Operating System: OSX 10.13
-
Node Version: 8.10.0
- NPM Version: 5.6.0
-
Browser: all
-
Language: all
-
Loader/bundler: Webpack
Current behavior:
When running au run
with Webpack 4.2.0 in a brand new project, an error occurs which prevents the application from compiling successfully:
✖ 「wdm」: ConcurrentCompilationError: You ran Webpack twice. Each instance only supports a single concurrent compilation at a time.
at Compiler.run (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:147:37)
at rebuild (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack-dev-middleware/lib/context.js:81:24)
at done (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack-dev-middleware/lib/context.js:59:7)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/u0117404/Projects/test-webpack-broke/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:18:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/u0117404/Projects/test-webpack-broke/node_modules/tapable/lib/Hook.js:35:21)
at emitRecords.err (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:199:22)
at Compiler.emitRecords (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:311:39)
at emitAssets.err (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:193:10)
at hooks.afterEmit.callAsync.err (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:297:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/u0117404/Projects/test-webpack-broke/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:15:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/u0117404/Projects/test-webpack-broke/node_modules/tapable/lib/Hook.js:35:21)
at asyncLib.forEach.err (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:294:27)
at done (/Users/u0117404/Projects/test-webpack-broke/node_modules/neo-async/async.js:2809:11)
at /Users/u0117404/Projects/test-webpack-broke/node_modules/neo-async/async.js:2760:7
at MemoryFileSystem.writeFile (/Users/u0117404/Projects/test-webpack-broke/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
at writeOut (/Users/u0117404/Projects/test-webpack-broke/node_modules/webpack/lib/Compiler.js:280:29)
This behavior does not occur if you run the project using nps
or if you roll the Webpack version back to 4.1.1.
This appears to be somewhat related to this Pull Request in Webpack 8 days ago: https://github.com/webpack/webpack/pull/6691
Reproduction is fairly easy:
- Create a fresh project using
au new
. - Install all dependencies using either
npm
oryarn
. (I tested both.) - Run
au run
and try to navigate to the page in any browser.
The error will occur.
- What is the expected behavior?
With a fresh CLI project we should see “Hello world!” when hitting the application for the first time.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Problems with the CLI - Help Requests - The Aurelia Discourse
I cd to the directory and run “au build” (or “au run”) and the following error happens. ERROR in C:\Users\simon\Documents\1.
Read more >Error: Cannot find module 'webpack-cli/bin/config-yargs' with ...
I looked around and found that you had to change the script to "webpack serve" and did that but then it gives me...
Read more >Bug listing with status UNCONFIRMED as at 2022/12/28 19 ...
Terminal network speed test that uses servers from Speedtest.net" ... -e world' causing compilation failure due to circular dependencies" status:UNCONFIRMED ...
Read more >Command Line Interface - webpack
warning. If you want to run webpack using npx please make sure you have webpack-cli installed. Commands.
Read more >webpack-cli | Yarn - Package Manager
cache issue (#1862 (305c188) · check webpack installation before running cli (#1827 (be509fa) · defer setting default entry to core (#1856 (5da1f81) ·...
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
After consideration we don’t see any use cases for
au run
without a watch mode. So I’ve made--watch
the default for the run command (https://github.com/aurelia/cli/commit/26cce92ae8e3315c4c2b738c937e4c1752a5b801).People are still running into this issue when creating new projects. Maybe we should stop them from installing webpack 4.2.x until they fix the issue (or we do) ?
https://github.com/aurelia/cli/blob/master/lib/dependencies.json#L105 Change it to something like
~4
for the time being ?