Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- css
- cta버튼
- JavaScript
- codestate
- 코드스테이츠
- frontend
- html
- WAI-ARIA
- 개발자
- Javascript #코드스테이츠
- css in js
- CDD
- 원시자료형
- self reliance
- 자바스크립트
- JS
- 프론트엔드
- 프로토타입
- 객체지향
- Router
- 호스트인식
- 코드스테이스
- 계산기
- Prototype
- codestates
- OOP
- 참조자료형
- condestates
- 회고
- cta button
Archives
- Today
- Total
jh.nrtv
Error- npm start 불가 에러 - There might be a problem with the project dependency tree. 본문
Error
Error- npm start 불가 에러 - There might be a problem with the project dependency tree.
wlgus3 2023. 1. 3. 15:49npm start 실행 시 아래와 같은 오류 발생
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^7.11.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/Users/kimjihyeon/node_modules/eslint (version: 8.31.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /Users/sangminpark/Desktop/React/node_modules/webpack is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls webpack in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
내용 읽어보니 프로젝트 내의 'eslint'모듈 버전과 프로젝트 외에 'eslint'모듈 버전이 맞지 않아서 발생하는 문제인 듯 함
시키는대로 1~부터 진행해 봐도내 실수인지 잘 되지 않는 것을 확인
프로젝트 내에서 아래 명령어 시도 후
npm ls eslint //설치된 eslint 확인
npm uninstall eslint --save //프로젝트 내 eslint 삭제하고 package.json에서도 삭제
다시 npm start 해도 동일증상
해결
결국 프로젝트 외부에 깔린 eslint를 프로젝트가 요구하는 eslint의 버전과 동일하게 만들기 위해서
바탕화면 터미널에서 삭제 후 재설치
MacBookAir ~ % npm ls eslint //eslint 버전 확인
MacBookAir ~ % npm uninstall eslint //삭제
MacBookAir ~ % npm install eslint@7.11.0 //버전 설정 후 재설치
+참고링크
'Error' 카테고리의 다른 글
[error] vercel배포중 Module not found: Can't resolve 'perf_hooks' ReactJS (0) | 2023.07.14 |
---|---|
[error]kakaoMap TypeError: window.kakao.maps.LatLng is not a constructor 에러 (0) | 2023.07.08 |
[트러블 슈팅] data.map()에서 element에 component 연결 (0) | 2023.04.10 |
Error- React-router-dom 사용시 Invalid Hook Call Warning (0) | 2023.01.02 |
Error - npm install시 'npm ERR! gyp ERR! ...' 반복 오류 (1) | 2022.12.23 |