в packaje.json
"scripts": {
"build": "node build/build.js",
"test:unit": "vue-cli-service test:unit", //нужный мне скрипт
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"e2e": "node test/e2e/runner.js",
"start": "npm run dev",
"test": "npm run unit && npm run e2e",
"unit": "jest --config test/unit/jest.conf.js --coverage"
},
но при запуске скрипта "test:unit" вот такая ошибка, если через yarn
❯ yarn run test:unit
yarn run v1.22.10
$ vue-cli-service test:unit
/bin/sh: vue-cli-service: команда не найдена
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
и такая, если через npm
> vue-cli-service test:unit
sh: vue-cli-service: команда не найдена
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! mailing@1.0.0 test:unit: `vue-cli-service test:unit`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the mailing@1.0.0 test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dmelnik/.npm/_logs/2020-11-09T10_37_50_108Z-debug.log
vue/cli установлен глобально, выполнив в проекте команду vue --version получаю
❯ vue --version
@vue/cli 4.5.8