본문 바로가기
  • 여행하고 먹는 즐거운 콘지의하루
카테고리 없음

npm run dev/serve 시, ENOENT 오류 발생 해결 방법

by 콘지 2022. 2. 28.

git clone 이나 외부에서 vue 프로젝트를 받아와서

호기롭게 npm run dev/serve를 호출했을 때 다음과 같은 오류를 보는 경우 당황스러울 것입니다.

 

sh: 1: vue-cli-service: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! django-vue@0.1.0 serve: `vue-cli-service serve`
npm ERR! spawn ENOENT npm ERR!
npm ERR! Failed at the django-vue@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-02-28T04_45_48_631Z-debug.log

저 같은 경우에는 npm 의 캐시를 비워줌으로써 이슈가 해결 되었습니다.

 

커맨드라인에 다음 명령어를 입력해서 npm 캐시를 비워주고, 다시 재설치를 해보시고

npm cache clean --force
npm install
npm run serve #실행

그러면 정상적으로 vue project가 실행됩니다 :) 

반응형

댓글