Skip to content
Advertisement

Provide custom parameters ($npm_config_) to npm scripts on Windows

I have npm scripts in the package.json, I would like to provide custom parameter from the command line. I found many stackoverflow questions and answers but none of them works. I tried this solution:

JavaScript

When I run the command:

JavaScript

As you can see, it does not echo test.

This is my configuration:

JavaScript

I tried this, on Linux and it works. This is related to Windows.

Advertisement

Answer

The solution is to use % instead of $.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement