본문 바로가기

React

[React] 오류 sh: react-scripts: command not found

1. 에러 상황

npm start 실행 시 다음과 같은 오류가 났다.

 

2. 에러 코드 

sh: react-scripts: command not found

3. 원인 

package.json 내 모든 dependency를 다운로드하지 않아 package.json 내 script를 제대로 읽지 못해서 생긴 에러이다.

 

해결 방법

npm install 을 통해 모든 패키지를 설치해주기! 

npm install

 

npm start 를 하니까 리액트가 잘 실행되었다! 

 

 

출처 : https://heytech.tistory.com/412