[React] npm start 에러 (This is related to npm not being able to find a file.)

PersesTitan·2022년 6월 26일
1

Error

목록 보기
7/18

리액트에서 설치하고 npm start를 때려보니 다음과 같은 에러가 났습니다.

npm ERR! enoent ENOENT: no such file or directory, open '[경로]/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

혹시나해서 pwd를 터미널에 때려보니 경로가 package.json이 있는 경로의 상위 폴더 였습니다.
그래서 cd 를 이용하여 디렉토리를 변경하고 npm start를 때려주니깐 잘 작동이 되었습니다.

".../경로/프로젝트명" 와 같은 경로로 되어 있으면 저와 같은 문제일 경우 해결 되었을 겁니다.

profile
안녕하세요 페르세스 티탄입니다! 부족한 부분이 많이 있겠지만 잘부탁드립니다.

3개의 댓글

comment-user-thumbnail
2023년 4월 13일

감사합니다!!!!!!!!! 큰 도움이 되었습니다!!!!

1개의 답글
comment-user-thumbnail
2023년 9월 25일

ㅎㅎ 감사합니다!

답글 달기