티스토리 뷰

React 프로젝트를 진행하던 중에 react-bootstrap을 적용하기 위해 해당 패키지를 설치 후 작업을 진행하였다.

 

작업을 두대의 기기에서 번갈아가며 진행하는 상황이었다.

 

처음 작업을 진행하였던 1번 기기에서는 패키지 설치치 후 bootstrap이 잘 적용되는 것을 확인하였다.

 

문제는 2번 기기에서 작업한 소스를 git pull 진행 후 로컬에서 구동을 진해하였으나 아래와 같은 에러 메시지가 발생하였다.

 

PS 프로젝트경로> npm run start
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN npm npm does not support Node.js v16.16.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12, 13.
npm WARN npm You can find the latest version at https://nodejs.org/

> 프젝트명@0.1.0 start 프로젝트경로
> react-scripts start

'react-scripts'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 프로잭트명@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 프젝트명@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

 

원인은 프로젝트를 pull 한 2번 기기에서는 해당 npm react-bootstrap 패키지를 설치하지 않았기 때문에 발생한 에러였다.

 

조치방법으로는 아래와 같이 해당 패키지를 업데이트 및 설치를 진행해 주면 된다.

 

npm update
또는
npm install -g react-script
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함