Posted in Command Line, JavaScript Pass Command Line Arguments to npm Binny V A October 15, 2022 Leave a Comment on Pass Command Line Arguments to npm If you want to pass command line arguments to npm scripts, use the -- separator. Example… npm run build -- --prefix-paths This will pass the --prefix-pathsto the build script. Please note the double -- in the command. Author: Binny V AA philosopher programmer who specializes in backend development and stoicism.