How to set shell for npm run-scripts in Windows

后端 未结 7 2061
执笔经年
执笔经年 2020-11-28 02:46

I\'m running npm on Windows and would like to use & style parallel operations in run-scripts but running in parallel in cmd is kind of messy in my package.json file I\'

7条回答
  •  攒了一身酷
    2020-11-28 02:58

    Since npm 5.1

    npm config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"  
    

    or (64bit installation)

    npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
    

    Note that you need to have git for windows installed.

    You can revert it by running:

    npm config delete script-shell
    

提交回复
热议问题