React 오류 기록 npm start와 yarn start가 안될 때
➡ 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\admin\AppData\Local\npm-cache\_logs\2022-12-30T09_43_15_420Z-debug-0.log
➡ yarn start 오류 내용
yarn run v1.22.19
warning package.json: No license field
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
검색했을 때 나온 메인 문제 3가지
- package.json 파일이 없거나 손상되었습니다.
- package.json에 시작 스크립트가 정의되어 있지 않습니다.
- 시작 스크립트는 패키지에 정의되어 있습니다. package.json파일이지만 올바른 스크립트가 아닙니다.
해결방법이라고 알려준 것들

➡ 안됨
package.json 파일의 "scripts"개체에 start 스크립트를 추가 하고 다시 npm start 해보기

➡ 원래 있었음 ㅠ_ㅠ
npm run start을 사용해보기

또 안됨..
npm install 한 후 다시 npm start 해보기
스타트 하는 경로가 잘못되어있었다..! 폴더 하나 더 들어가서 부르니까 됐음..!
'유쾌하지 못한 오류 기록' 카테고리의 다른 글
React 오류 기록 Uncaught Error: useRoutes() may be used only in the context of a <Router> component. (0) | 2023.01.03 |
---|---|
Git 오류 기록 cannot lock ref 'refs/remotes/origin' (0) | 2023.01.03 |
React 오류 기록 Module not found: Error: Can't resolve (0) | 2022.12.30 |
React 오류 기록 'react-scripts'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. (0) | 2022.12.28 |
Git 오류 기록 혼자서 낸 충돌(conflict) (0) | 2022.12.27 |