webpack causes ECONNRESET during build when running on a M1 MacBook
See original GitHub issueBug report
What is the current behavior?
In some of my bigger existing projects using webpack and webpack-dev-server, npx webpack
and npx webpack serve
do no longer work as expected since I moved over to my new MacBook Pro (M1 chip).
When running either of the two commands, It shows the following error:
>> npx webpack
node:events:498
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:520:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
This happens less often if the project is smaller.
Occurs when using both the current its version of Node (16.14.0) as well as when using the latest (17.7.0). It doesn’t occur when using Node 15.14.0 (still delivered as an x64 without native M1 support).
As everything else works and it’s just webpack that’s running into this, I am now opening this here.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Other relevant information: webpack version: 5.70.0 Node.js version: 16.14.0 / 17.7.0 Operating System: MacOS 12.2.1 Additional tools: –
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top GitHub Comments
@Anatanokami I think the import should be
@import (css) url("https://fonts.googleapis.com/css2?family=Roboto");
. Mine was equal to yours, adding the(css)
solved the issueThink I found the problem:
Seems to be that it’s either a less-loader or a css-loader issue. When I remove the font family import from my .less file, I cannot reproduce this any longer.
So it is definitely not a bug for here.