에러메시지
서버를 실행하려고 'npm run serve'를 입력했늗네 에러가 나올 때,
npm ERR! code ENOENT
.npm ERR! enoent This is related to npm not being able to find a file.
에러메시지 내용
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\*****\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\*****\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\*****\AppData\Roaming\npm-cache\_logs\2022-11-07T04_41_12_997Z-debug.log
'package.json' 파일을 못 찾는다는 메시지이므로,
위치를 확인 해볼 필요가 있다.
위치확인
'package.json'파일이 있는 위치는 'JSH-VUE > pages > 'package.json'인데,
현재 위치는 'JSH-VUE'에서 실행했므로 파일을 못찾는것은 당연한 일
'page(프로젝트 명)' 안으로 들어가서 실행해야 한다.
cd page(프로젝트 명)
여기서 다시 서버를 실행 시켜보자.
npm run serve
결과확인
정상적으로 실행이 된다.
반응형