본문 바로가기

개발일지/error

npm error errno -4058 실행 경로 오류

반응형

Either try using a new directory name, or remove the files listed above.
npm error syscall open
npm error path E:\dev\prac\aws_s3_prac\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'E:\dev\prac\aws_s3_prac\package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\leesu\AppData\Local\npm-cache\_logs\2024-11-15T07_48_17_553Z-debug-0.log      

 

react 프로젝트를 설치 후 처음 실행시 만났던 오류이다.  간단하게 말하면 실행 경로다 달라 나타나는 오류이다. react를 생성한 폴더에서 하나의 폴더를 더 생성해 터미널의 위치가 이전 폴더라 생기는 오류였다. 

 

현재 실행 폴더 : E:\dev\prac\aws_s3_prac\package.json

실행 가능 폴더 : E:\dev\prac\aws_s3_prac\aws_s3_prac\package.json

 

 결론적으로 터미널에서 해당 디렉토리 경로로 이동하여 start 사용해야 package.json가 동작하는데 전 폴더에서 실행을 한것이었다.

반응형