Skip to content

Commit

Permalink
fix(config): gets errors about @vue/cli and prettier
Browse files Browse the repository at this point in the history
Error:
- If these packages are not installed globally you get an error in the terminal.
`sh: 1: vue-cli-service: not found`
`sh: 1: prettier: not found`
`Volta error: Could not locate executable 'prettier' in your project.`

Solution:
- Check the list of installed global dependencies.
`npm list -g --depth=0`
- Install the `@vue/cli` and `prettier` packages globally in their stable version.
`npm install -g @vue/cli@5 prettier@2`
- Add packages to the `globalDependencies` object to alert other developers that they are required.

References:
- https://cli.vuejs.org/#getting-started
- https://stackoverflow.com/a/59867005
  • Loading branch information
beatrizsmerino committed Nov 24, 2023
1 parent 9fc446a commit 14d4c95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@
"vue-template-compiler": "^2.7.15"
},
"globalDependencies": {
"@vue/cli": "^5.0.8",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"commitizen": "^4.3.0",
"conventional-changelog-cli": "^2.2.2",
"cz-conventional-changelog": "^3.3.0",
"prettier": "^2.8.8",
"standard-version": "^9.5.0"
},
"resolutions": {},
Expand Down

0 comments on commit 14d4c95

Please # to comment.