启动命令 yarn serve 报错
yarn run v1.10.1
$ vue-cli-service serve --open
/bin/sh: 1: vue-cli-service: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
怎么解决??
问题已经解决,解决方法:
package.json,scripts,vue-cli-service修改为全路径引用即可:
"scripts": {
"serve": "node_modules/@vue/cli-service/bin/vue-cli-service.js serve --open",
"build": "node_modules/@vue/cli-service/bin/vue-cli-service.js build",
"lint": "node_modules/@vue/cli-service/bin/vue-cli-service.js lint"
},
推荐文章: