인프런 커뮤니티 질문&답변

Donggun Han님의 프로필 이미지

작성한 질문수

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

비디오 업로드 FORM 만들기 (1)

npm run dev시 오류

20.03.25 13:49 작성

·

2.5K

2

안녕하세요 !
영상 4분 30초 쪽에 보면 npm run dev 입력하면 오류가 발생하는데요 > react-boiler-plate@1.0.0 dev C:\VScodeProject\boilerplate-mern-stack-master > concurrently "npm run backend" "npm run start --prefix client" [0] Error occurred when executing command: npm run backend [0] Error: spawn cmd.exe ENOENT [0] at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) [0] at onErrorNT (internal/child_process.js:469:16) [0] at processTicksAndRejections (internal/process/task_queues.js:84:21) [1] Error occurred when executing command: npm run start --prefix client [1] Error: spawn cmd.exe ENOENT [1] at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) [1] at onErrorNT (internal/child_process.js:469:16) [1] at processTicksAndRejections (internal/process/task_queues.js:84:21) [1] npm run start --prefix client exited with code -4058 [0] npm run backend exited with code -4058 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-boiler-plate@1.0.0 dev: `concurrently "npm run backend" "npm run start --prefix client"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-boiler-plate@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hdg42\AppData\Roaming\npm-cache\_logs\2020-03-23T12_21_01_907Z-debug.log 이렇게 나옵니다. 무슨 문제일까요?

답변 11

2

beginagain님의 프로필 이미지

2021. 07. 25. 19:49

안녕하세요 혹시 어떻게 해결하셨나요???

1

김서연님의 프로필 이미지

2022. 01. 12. 01:44

저도 같은 문제를 겪고 있는데 혹시 어떻게 해결하셨는지 여쭤봐도 될까요?

1

Donggun Han님의 프로필 이미지
Donggun Han
질문자

2020. 03. 25. 23:28

위 사진이 npm install  루트랑 클라이언트에서 설치하는 것입니다.

0

김수홍님의 프로필 이미지

2021. 01. 22. 12:32

module.exports = {
    mongoURI:'mongodb+srv://Username:<password>@cluster0.xpl7k.mongodb.net/<dbname>?retryWrites=true&w=majority'
}
몽고디비 유저네임이랑 패스워드 안적어서 생긴 오류
아닌가요?

0

Rita님의 프로필 이미지

2020. 11. 19. 19:35

전 package-lock.json 삭제하고 npm install 다시 하니까 해결됐습니다! https://qastack.kr/programming/42308879/npm-err-code-elifecycle

0

theonlyoneu님의 프로필 이미지

2020. 06. 04. 23:08

혹시 yarn 사용시 에러 나시는 분 참고 하세요. ^^

--prefix client 말고 아래와 같이 --cwd ./client 로 바꿔주세요. 

"scripts": {
    "start": "node index.js",
    "server": "nodemon index.js",
    "client": "yarn --cwd ./client run start",
    "dev": "concurrently -k \"yarn run server\" \"yarn run client\""
  },

0

니나니노님의 프로필 이미지

2020. 06. 03. 19:53

Path 환경변수에 C:\windows\system32  추가해보시고 그래도 안 되시면

export PATH="$PATH:/mnt/c/Windows/System32" npm run dev  해보세요.

0

Donggun Han님의 프로필 이미지
Donggun Han
질문자

2020. 03. 25. 23:30

이게 실행시켰을때 오류 나오는 부분입니다.  다른 예제 리액트 기본 create-react-app 하고 yarn start 할때도 똑같이는 안나오지만 실행이 안되거든요.. 왜 그럴까요. node 파일 에 문제가 생긴건지.

0

Donggun Han님의 프로필 이미지
Donggun Han
질문자

2020. 03. 25. 23:28

0

Donggun Han님의 프로필 이미지
Donggun Han
질문자

2020. 03. 25. 23:28

0

John Ahn님의 프로필 이미지
John Ahn
지식공유자

2020. 03. 25. 23:02

혹시   npm install 로   dependency를 다운 받으셨나요 ~ ?