Node commands additional arguments

Author

Simone Massaro

Published

June 2, 2025

To pass an argument to a node run command you need to add them after the -- separator.

So for example if you want to pass the --host argument you need to do: npm run dev -- --host and not npm run dev --host, what I’d have done in my ignorance.

I know this is a not a big discovery, but I am a quite new to node and I need to thank that the LLM saved me a lot of confusing debugging time.