Vue 설치 오류 (zsh: command not found: vue)

Sulhwa Choi·2022년 10월 22일
0

1. Vue 설치 중 오류발생

npm install -g @vue/cli

여기서 권한 없음 에러가 발생 시! "sudo"를 붙혀서 해결가능합니다!

sudo npm install -g @vue/cli

여기서 "vue --version"을 실행시켰을때

  • >zsh: command not found: vue 라는 에러가 발생..

2. 해결방법

  1. 먼저 모든 vue cli를 제거

sudo npm uninstall --global vue-cli
sudo npm uninstall --global @vue/cli

  1. 최신 버전의 vue cli를 설치

sudo npm install --global @vue/cli@latest

  1. "vue --version" 을 통해 잘 깔린것을 확인할 수 있습니다!
~ % vue --version
@vue/cli 5.0.8

🐻 참고하였습니다 https://stackoverflow.com/questions/58590890/how-to-fix-zsh-command-not-found-vue

🌻 1. vue 파일에서 template 부분에서 문제가 있다고 알려주고 있었다

https://velog.velcdn.com/images/im_sulhwa/post/c77f6084-0eb6-4987-abdd-e17f96e8e32b/image.png

🌻2. 문제 내용!
-> 대충 TypeScript Intellisense를 활성화 시켜야한다는 말..

TypeScript intellisense is disabled on template.
To enable, configure `"jsx": "preserve"` in the `"compilerOptions"`
property of tsconfig or jsconfig. To disable this prompt instead, configure `"experimentalDisableTemplateSupport": true` in `"vueCompilerOptions"`
property.volar

🌻3. jsconfig.json 에 코드를 추가해주니 문제가 해결되었다!

"jsx": "preserve"

https://velog.velcdn.com/images/im_sulhwa/post/a716da4d-5a80-443a-b74c-2f52d32a1ad4/image.png

profile
개발 공부 중 〰️ ٩(๑•̀o•́๑)و ✨

0개의 댓글