[Vue] Vue 설치 command not found

이태권 (Taekwon Lee)·2022년 7월 19일
0

Vue를 설치를 했지만, zsh에 뜨지 않는다... 무엇이 문제일까

$> vue --version
zsh: command not found: vue

설치

sudo npm install @vue/cli --location=global

$> sudo npm install @vue/cli --location=global
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md



확인

npm list --depth=0 --location=global

$> npm list --depth=0 --location=global
/Users/taekwon/.npm-global/lib
├── @vue/cli@5.0.8
├── electron@19.0.8
└── npm@8.14.0
$> export PATH=$PATH:/Users/taekwon/.npm-global/bin



❓ 새로운 문제점

  • export는 임시적인 환경변수 설정이기에 새로운 터미널을 열 경우 아래와 같이 초기화 된다.
  • 영구적인 설정은 .zshrc에서 해주어야 한다.
$> vim ~/.zshrc
export PATH="/Users/taekwon/.npm-global/bin:$PATH"
$> source ~/.zshrc



❗️ 해결



🔖 참고 자료

profile
(Backend Dev.) One step at a time

0개의 댓글