【해결! 】 Vue-Cli를 설치 ... 할 수 없다!

상황



· Vue-Cli를 사용하여 본격적인 앱 개발을 위해 Vue-Cli를 설치하려고했습니다.
· 과거에도 Vue-Cli를 설치하여 사용한 경험이 있습니다!
・커맨드 프롬프트를 열고 「정말! 할거야!」라고 생각하고 있던 화살 앞, 조속히 출코를 꽉 찼다...라는 이야기입니다.

일어난 일 ①



· 명령 프롬프트에서 아래와 같이 Vue-Cli 설치
npm -g install vue-cli

· 다음 오류가 발생
npm WARN deprecated [email protected]: This package has been deprecated in favour of @vue/cli
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! code EEXIST
npm ERR! path C:\Program Files (x86)\Nodist\bin\node_modules\vue-cli\bin\vue
npm ERR! dest C:\Program Files (x86)\Nodist\bin\*vue.cmd*
npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files (x86)\Nodist\bin\node_modules\vue-cli\bin\vue' ->'C:\Program Files (x86)\Nodist\bin\vue.cmd'
npm ERR! File exists: C:\Program Files (x86)\Nodist\bin\vue.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Owner\AppData\Roaming\npm-cache\_logs\2020-12-24T15_55_11_169Z-debug.log

대책①



포인트는 5행째~11행째.
요약하면
「이미 인스톨 하고 있는 데이터가 있을 때의 에러야!」(5행째)
「구체적으로는 Program Files (x86)\Nodist\bin\vue.cmd 의 일이야!」(8~9행째)
"이 파일을 지워 다시 한번 해봐!"(10 행째)
그리고 있다.
・서두 쓴 대로, 한번 Vue-Cli는 인스톨 한 적이 있으므로, 그 때 인스톨한 파일들이 남아 있었다.
아무래도 그 파일이 이번 설치를 방해하고 있는 것 같다.
・이므로, 일단 Program Files (x86)\Nodist\bin 에 있는 vue.cmd 를 지우고 다시 npm -g install vue-cli

일어난 일 ②



・개발로 진행한다! 생각하면 다음 오류가 발생합니다.
npm WARN deprecated [email protected]: This package has been deprecated in favour of @vue/cli
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! code EEXIST
npm ERR! path C:\Program Files (x86)\Nodist\bin\node_modules\vue-cli\bin\vue
npm ERR! dest C:\Program Files (x86)\Nodist\bin\vue
npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files (x86)\Nodist\bin\node_modules\vue-cli\bin\vue' -> 'C:\Program Files (x86)\Nodist\bin\*vue*'
npm ERR! File exists: C:\Program Files (x86)\Nodist\bin\vue
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

・아까와 같은 에러. 잘 보면. . .
npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files (x86)\Nodist\bin\node_modules\vue-cli\bin\vue' -> 'C:\Program Files (x86)\Nodist\bin\vue'
npm ERR! File exists: C:\Program Files (x86)\Nodist\bin\vue

· 지울 파일의 이름이 바뀝니다.

대책②



・과연. 과거 설치한 몇개의 파일이 방해해 이번 인스톨 할 수 없는 것이다.
・결국, 「지우는⇒
○○에 지정되어 지워진 파일은 다음과 같습니다.

・이렇게 몇번이나 에러를 빈발한 이유는, 이러한 파일들은 npm -g install vue-cli 를 실행하면 또 최신 ver가 태어난다고 하는 것.
그래서, 그 태어난 파일들이 에러의 원인이 되어 버리는 일도 있었다.
・결론, 위 그림의 파일들을 단번에 지워 npm -g install vue-cli 로 정상적으로 인스톨 완료!

오류의 원인



・이번 에러의 원인은 아무래도 앞서 보여준 파일들의 인스톨 한 일시인 것 같다.
・원래 인스톨한 파일들은 2020/12/20에 인스톨한 물건이었으므로, 이것이 어느 한 에러를 발생해 버렸다.
・거기서 위와 같이 파일들을 단번에 지워 npm -g install vue-cli 를 실행해 최신판의 파일이 작성되어, 잘 되었다! 라는 흐름.

마지막으로



큰 일은 아니지만, 구그는 같은 에러 코드 나와있는 분들은 계셨습니다만, 대부분의 분은 Mac 유저 분이었습니다.
그런 분의 대책안을 참고로 한 자신은 이 에러도 내고 있었습니다.



여기서 처음으로 Window 유저인 자신은 "sudo"나 "rm"등의 Linux를 사용할 수 없다는 것을 배웠습니다.
참고로.

좋은 웹페이지 즐겨찾기