devlog_zz

vue 3 cli 설치 중 오류 해결 ( npm ERR! code EEXIST syscall rename ~ ) 본문

Front End/Vue

vue 3 cli 설치 중 오류 해결 ( npm ERR! code EEXIST syscall rename ~ )

YJ_SW 2023. 11. 22. 08:16
728x90

vue3 CLI 설치 중 오류 해결

설치

// Vue CLI 설치
npm install -g @vue/cli

// Vue 프로젝트 생성
vue create vue-tutorial

에러 발생

Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 3] babel, eslint)


Vue CLI v5.0.8
✨  Creating project in /~~/vue/vue-tutorial.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

npm ERR! code EEXIST
npm ERR! syscall rename
npm ERR! path /~~/.npm/_cacache/tmp/3dad4dbd
npm ERR! dest /~~/.npm/_cacache/content-v2/sha512/24/44/57f569c4151ea15af97a7ecd2c6b51af10aec43c6e7531420a451bb51f3c14e7680677e0b152596094922f1b581132da5ef46f951695fd5d9b26e7aeff6f
npm ERR! errno EEXIST
npm ERR! Invalid response body while trying to fetch https://registry.npmmirror.com/@vue%2fbabel-sugar-functional-vue: EACCES: permission denied, rename '/~~/.npm/_cacache/tmp/3dad4dbd' -> '/~~/.npm/_cacache/content-v2/sha512/24/44/57f569c4151ea15af97a7ecd2c6b51af10aec43c6e7531420a451bb51f3c14e7680677e0b152596094922f1b581132da5ef46f951695fd5d9b26e7aeff6f'
npm ERR! File exists: /~~/.npm/_cacache/content-v2/sha512/24/44/57f569c4151ea15af97a7ecd2c6b51af10aec43c6e7531420a451bb51f3c14e7680677e0b152596094922f1b581132da5ef46f951695fd5d9b26e7aeff6f
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/_logs/2023-11-02T01_21_20_572Z-debug-0.log
 ERROR  Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@vue/cli/lib/util/executeCommand.js:138:16)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

해결방법

npm 캐시 지우기

sudo npm cache clear --force

 

728x90

'Front End > Vue' 카테고리의 다른 글

vue study - Dynamic components  (0) 2020.03.26
vue study - slot  (0) 2020.03.26
vue study - life cycle hooks  (0) 2020.03.26
vue Study - event bus  (0) 2020.03.26
vue Study - event (child to Parent)  (0) 2020.03.26
Comments