windows 环境 启动报错 '.\bin\config' 不是内部或外部命令,也不是可运行的程序

windows环境启动项目报错如下

D:\Tools\nodejs\node\node-v12.16.3\node.exe D:\Tools\nodejs\node\node-v12.16.3\node_global\node_modules\yarn\bin\yarn.js run start:uat
yarn run v1.22.4
$ ./bin/config uat && cross-env NODE_ENV=dev vue-cli-service serve
‘.\bin\config‘ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

 

package.json配置如下:

"scripts": {
"start:dev": "./bin/config dev && cross-env NODE_ENV=dev vue-cli-service serve",
"start:uat": "./bin/config uat && cross-env NODE_ENV=dev vue-cli-service serve",
"start:staging": "./bin/config staging && cross-env NODE_ENV=dev vue-cli-service serve",
"start:prod": "./bin/config prod && cross-env NODE_ENV=dev vue-cli-service serve",
"build:dev": "./bin/config dev && cross-env NODE_ENV=dev vue-cli-service build",
"build:uat": "./bin/config uat && cross-env NODE_ENV=uat vue-cli-service build",
"build:staging": "./bin/config staging && cross-env NODE_ENV=pre vue-cli-service build",
"build:prod": "./bin/config prod && cross-env NODE_ENV=production vue-cli-service build",
"lint": "vue-cli-service lint"
},

修改为如下,前面加个node,再启动就好了
"scripts": {
"start:dev": "./bin/config dev && cross-env NODE_ENV=dev vue-cli-service serve",
"start:uat": "node ./bin/config uat && cross-env NODE_ENV=dev vue-cli-service serve",
"start:staging": "./bin/config staging && cross-env NODE_ENV=dev vue-cli-service serve",
"start:prod": "./bin/config prod && cross-env NODE_ENV=dev vue-cli-service serve",
"build:dev": "./bin/config dev && cross-env NODE_ENV=dev vue-cli-service build",
"build:uat": "./bin/config uat && cross-env NODE_ENV=uat vue-cli-service build",
"build:staging": "./bin/config staging && cross-env NODE_ENV=pre vue-cli-service build",
"build:prod": "./bin/config prod && cross-env NODE_ENV=production vue-cli-service build",
"lint": "vue-cli-service lint"
},

windows 环境 启动报错 '.\bin\config' 不是内部或外部命令,也不是可运行的程序

上一篇:Docker——windows10安装Docker Desktop


下一篇:C# 控制台定时器