I can not find some doc in my help. In my npm project I have the script start
"start": "cross-env NODE_ENV=development node server"
I must invoke the script start with one or more vars from cli (I can not change the package.json), example:
npm run start OTHER=1000
the "OTHER" is a var how is NODE_ENV, but is it possibile write (I know is it not possibile, I ask you some solution to do it):
npm run cross-env NODE_ENV=development OTHER=1000 node server
You can define the environment variable as you run npm. Like this:
npm picks it up and passes it to the script.
Or you can predefine it. Like this (sh, bash)
If you're on a windows cmd shell, try this