DEV Community

Discussion on: Handling Command-line Arguments in NPM Scripts

Collapse
 
pierbjx profile image
PierBJX

Hello,
this does not work on Windows env. How could I make it work ?

Collapse
 
zorida profile image
zorida

Try to install cross-env as a dev dependency. Then you have a universal way to declare scripts with parameters / arguments. :)

npmjs.com/package/cross-env

Collapse
 
felipperegazio profile image
Felippe Regazio

Im really sorry, but i have only Unix-Like Systems at hand now, so i cant help you since i have no way to test it on a windows system. But you can take a look on the NPM official documentation:

docs.npmjs.com/cli/v7/using-npm/co...

It doesn't tell anything about config variables specificity for windows, so maybe you can do a review on your scripts following the docs to do a double check.