Node .env 활용

eunji hwang·2020년 7월 7일
0
// .env
SKIP_PREFLIGHT_CHECK = true

패키지 버전 문제

// Error

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:

  "webpack": "4.42.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:

// ... 중략

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

위 에러는 package.json에 기입된 패키지 버전과 CRA의 같은 패키지의 버전이 충돌하기 때문에 발생한다.
이때는 루트에 .env를 만들어 SKIP_PREFLIIGHT_CHECK = true을 입력하여 해결할 수 있다.

콘솔 안내글에 수동설치 하지말라고 언급되어 있다. 수동설치 시 디버그가 어렵단다!

profile
TIL 기록 블로그 :: 문제가 있는 글엔 댓글 부탁드려요!

0개의 댓글