http-server
http-server copied to clipboard
Node 17 broke the catch all
After installing node 17, the following 404 happens when trying to use the catch all, it worked fine under node 16
(node:21632) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
[2021-11-02T04:15:09.843Z] "GET /foo" Error (404): "connect ECONNREFUSED ::1:1234"
[2021-11-02T04:15:09.843Z] "GET /foo" Error (404): "Not found"
[2021-11-02T04:15:09.845Z] "GET /foo" Error (404): "Not found"
Windows 10, node v17.0.1
Getting the same on 17 on OSX
Could you provide the full details about your environment? Especially the exact command(s) used, the http-server version, and also in this case, it would be helpful to see the output you get on Node v16 for the exact same commands
This issue has been inactive for 180 days
The same issue here on Node 18!
Any dynamic URL (other than root) isn't served from the root. But it got a 404 error.
I started the server with:
npx http-server -p 3000 --proxy http://localhost:3000? ./build
It's OK on node 16.
PSA: I ended up using sirv-cli with the --single
flag as a workaround.