If you have a similar problem and have upgraded from V1 to V2 then you need to add the complete HTTP URL, as per the GitHub repository https://github.com/bahmutov/start-server-and-test#use
# v1
$ "ci": "start-server-and-test test-server :4000 test",
# v2
$ "ci": "start-server-and-test test-server http://localhost:4000 test",