react 에서 CRA(create react-app)로 프로젝트를 실행할때,
종종 yarn start
해도 웹페이지가 실행되지 않는 문제가 발생했다.
에러 메세지는 아래와 같다.
Command failed with exit code 127
react-scripts: command not found
구글링 결과 아래와 같은 세가지 방법이 있었다.
1) yarn install
2) npm install
3) npm update ✅
순서대로 yarn 명령어부터 실행해 봤는데 여전했고,
npm install도 마찬가지였다.
마지막 3번 npm update
후 npm start
하니 정상적으로 렌더링 되었다.