windows环境启动项目报错如下
D:Tools
odejs
ode
ode-v12.16.3
ode.exe D:Tools
odejs
ode
ode-v12.16.3
ode_global
ode_modulesyarninyarn.js run start:uat
yarn run v1.22.4
$ ./bin/config uat && cross-env NODE_ENV=dev vue-cli-service serve
'.inconfig' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
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"
},