728x90
반응형
NestJS 서버 시작 시 아래와 같은 오류가 발생했다.
npm ERR! enoent This is related to npm not being able to find a file.
그래서 해당 오류를 검색을 해 원인과 해결방법을 찾았다.
그걸 공유해보도록 하겠다!
# 발생 원인
본 필자는 vscode를 사용하고 있었다.
NestJS 파일이 있는 경로는 C/nestProjects/test-app이다.
하지만 나는 C/nestProjects까지만 들어가서 vscode에 있는 터미널에서 npm run start를 실행시켰다.
결론은 상위 폴더에서 npm run start를 실행시켜서 오류가 발생한 것이다.
# 해결 방법
cd를 사용하여 파일이 있는 경로에 가서 npm run start을 실행시켜 주면 해결된다!
정말 간단한 원인이었다..!
참조
https://velog.io/@persestitan/React-npm-start-%EC%97%90%EB%9F%AC-This-is-related-to-npm-not-being-able-to-find-a-file
반응형