Reputation: 629
After I git clone a project I can't run npm run build
on Windows, although it's working on Mac and Linux :
"build": "API=https://dev-api.myexample.com/v1.0 babel-node build.js",
I got this error :
'API' is not recognized as an internal or external command, operable program or batch file.
Upvotes: 1
Views: 154
Reputation: 3816
You should use cross-env
(add it first to your dependencies with npm i cross-env
see https://www.npmjs.com/package/cross-env)
"build": "cross-env API=https://dev-api.myexample.com/v1.0 babel-node build.js",
Upvotes: 3