엠마의 개발공부일지

[오류해결] npm ERR! Missing script: "start" : npm start error 본문

카테고리 없음

[오류해결] npm ERR! Missing script: "start" : npm start error

Emmababy 2022. 7. 14. 15:36
728x90

증상

npm create-react-app test 명령어로 새폴더에 리액트 환경을 만들고 나서 

IDE에서 npm start 명령어 입력하면 아래와 같은 오류가 뜸

npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\emma\AppData\Local\npm-cache\_logs\2022-07-14T06_28_06_983Z-debug-0.log

 

 

 

 

원인

내 컴퓨터에 설치된 create-react-app의 버전이 낮으면 일어날 수 있는 오류

그리고, 설치과정에서 내컴퓨터에 어느 경로에서라도 'npm create-react-app'명령어가 적용이되어야하는데,

무슨이유인지는 모르겠지만 일부 폴더에서만 저 명령어가 적용되었다. 그래서 다른경로에서는 저 명령어 적용이 안되었던 것

 

 

 

 

 

해결

create-react-app을 삭제하고, 재설치하고, 실행하면 된다

삭제 : npm uninstall -g create-react-app

재설치: npm install -g create-react-app

실행: npx create-react-app test(원하는이름작명)

 

에러가 났던 프로젝트는 저 명령어를 실행해도 똑같이 에러난다

그렇기 때문에 저 명령을 실행하고, 새로 프로젝트를 만들어야한다.

728x90
Comments