닭발개발

[ERROR] 'npm start' returns error: "There might be a problem with the project dependency tree" 본문

오류기록

[ERROR] 'npm start' returns error: "There might be a problem with the project dependency tree"

D269 2023. 7. 4. 20:33
728x90

 

To fix the dependency tree, try following the steps below in the exact order:

Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
Delete node_modules in your project folder.
Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
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:

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.

Check if /Users/aliceparker/node_modules/webpack is outside your project directory. For example, you might have accidentally installed something in your home folder.

Try running npm ls webpack in your project folder. This will tell you which other package (apart from the expected react-scripts) installed webpack.

이런 에러가 뜨면서 npm start가 되지 않았다.

 

 

 

해결 방법:

1. 프로젝트 폴더 하위에 .env 라는 제목의 파일을 만들어준다.

2. 만든 파일에 SKIP_PREFLIGHT_CHECK=true 라고 작성하고 저장한다.

3. 그런 다음 npm start

 

 

구글링하다가 찾은 방법이라 원인은 모르지만;;;

일단 됐으니 기록만 남겨본다 ㅠ

 

 

 

 

 

 

728x90
반응형