在使用npm或者yarn执行script脚本为.sh文件时,windows下报错识别不了
- stack-overflow: https://stackoverflow.com/questions/34937724/running-bash-scripts-with-npm
- use-npm-run-shell: https://awsm.page/nodejs/run-shell-scripts-using-npm-script
.is not recognized as an internal or external command, operable program or batch file
在执行脚本前增加 sh 或者 bash 命令(基于终端的支持))
json
{
"setup": "sh ./scripts/setup.sh",
"setup": "bash ./scripts/setup.sh"
}
使用相对路径
json
{
"setup": "D:/Traning/lowcode-engine/scripts/setup.sh"
}