[webpack-cli] TypeError: Cannot create property 'key' on boolean 'true' HTTPS
System information
$ npm -v
7.14.0
$ nodejs -v
v14.17.0
$ yarn -v
1.22.5
$ node_modules/webpack-dev-server/bin/webpack-dev-server.js -v
@webpack-cli/serve 1.4.0
webpack 5.37.1
webpack-cli 4.7.0
webpack-dev-server 4.0.0-beta.3
Command
yarn encore dev-server --https --https-key=KEY_FILE --https-cert=CRT_FILE
Output
[webpack-cli] TypeError: Cannot create property 'key' on boolean 'true'
at processor (node_modules/webpack-dev-server/bin/cli-flags.js:157:24)
at Command.<anonymous> (node_modules/@webpack-cli/serve/lib/index.js:75:17)
at Command.listener [as _actionHandler] (node_modules/commander/index.js:922:31)
at Command._parseCommand (node_modules/commander/index.js:1503:14)
at Command._dispatchSubcommand (node_modules/commander/index.js:1443:18)
at Command._parseCommand (node_modules/commander/index.js:1460:12)
at Command.parse (node_modules/commander/index.js:1292:10)
at Command.parseAsync (node_modules/commander/index.js:1318:10)
at Command.<anonymous> (node_modules/webpack-cli/lib/webpack-cli.js:1289:32)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 2.
If you perform such a command
yarn encore dev-server --https-key=KEY_FILE --https-cert=CRT_FILE
Then the server runs on the https protocol, but the links to the files are incorrect

$ curl -I -k http://localhost:8080/build/img/favicon.b62181.webp
curl: (52) Empty reply from server
$ curl -I -k https://localhost:8080/build/img/favicon.b62181.webp
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Content-Type: image/webp
Accept-Ranges: bytes
Content-Length: 480
ETag: W/"1e0-eIw4xlffiQ4JXgrg3WZPJ53UYhc"
Date: Thu, 27 May 2021 08:31:55 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly reminder that this issue exists. If I don't hear anything I'll close this.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!