๐Ÿšง

[npm] yarn start, npn start ์—๋Ÿฌ ํ•ด๊ฒฐ (There might be a problem with the project dependency tree...)

purpplee 2021. 6. 5. 10:09
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.29.6"

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:

...

 

๋ฆฌ์•กํŠธ ์•ฑ ๋„์šฐ๋ ค๊ณ  yarn start ๋ฅผ ์ž…๋ ฅํ–ˆ๋Š”๋ฐ ์ด๋Ÿฐ ์˜ค๋ฅ˜๊ฐ€ ๋–ด๋‹ค.

์•Œ๋ ค์ฃผ๋Š”๋Œ€๋กœ packge-lock.json , yarn-lock.json, node_module ์ง€์šฐ๊ณ  npm install ์„ ์‹คํ–‰ํ•ด๋„ ํ•ด๊ฒฐ์ด ์•ˆ๋๋‹ค.

 

์ฐพ์•„๋ณด๋‹ˆ... ๋‚ด๊ฐ€ react native ๋ฅผ ํ•˜๋ฉฐ ๊น ๋ช‡ ๋ชจ๋“ˆ๋“ค์ด ๋ญ”๊ฐ€ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‚˜๋ณด๋‹ค -_-

ํ™ˆ์— ์žˆ๋Š” node_modules ๋ฅผ ์ง€์šฐ๋‹ˆ๊นŒ ํ•ด๊ฒฐ๋๋‹ค.

cd ~
rm -rf node_modules

 

์ฐธ๊ณ .

.env ํŒŒ์ผ์„ ๋งŒ๋“ค๊ณ  SKIP_PREFLIGHT_CHECK=true ๋ฅผ ๋„ฃ์€ ํ›„ ์‹คํ–‰์‹œ์ผœ๋„ ๋œ๋‹ค๊ณ  ํ•œ๋‹ค.

๋ฐ˜์‘ํ˜•