This is a quick fix (updated version) for an original "Live Server" package. Original version doesn't seem be maintained, and while there was a mayor braiking change ir the dependencies, I took to quick-fix it.
npm i -D dead-server
Package.json example:
"scripts": {
"dev": "dead-server --port=3000 --host=localhost"
}
Terminal command:
npm run dev
For more details, please refer to live-server documentation.