find-free-port
find-free-port copied to clipboard
Does not work for node v18.9.0 ?
After upgrading to node v18.9.0 (from v16), find-port-port failed to detect a port that is already being used.
issue repo:
https://github.com/ApolloTang/issue--find-free-port-not-working-on-node-18
I think I found the problem: after passing in the host it now works, see: https://github.com/ApolloTang/issue--find-free-port-not-working-on-node-18/blob/host-is-required-for-node18/issue.js#L8
I think that is because the host is now required for the net.createConnection() method for node 18, see:
https://github.com/mhzed/find-free-port/blob/master/index.js#L23