๋ฐ˜์‘ํ˜•

๊ฐœ๋ฐœ ๐Ÿพ/Error 9

nextjs _app.js useEffect์—์„œ ๋‘๋ฒˆ ํ˜ธ์ถœ ํ•˜๋Š” ๋ฌธ์ œ

์ฐธ๊ณ : https://dev.to/jahid6597/why-useeffect-is-running-twice-in-react-18c6 React18 ๋ฒ„์ „์ดํ›„ StrictMode์ผ๋•Œ useEffect ๊ฐ€ ๋‘๋ฒˆ์”ฉ ํ˜ธ์ถœ๋œ๋‹ค๊ณ  ํ•œ๋‹ค. ํ•œ ๋ฒˆ๋งŒ ํ˜ธ์ถœํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, next.config.js ์—์„œ strictMode๋ฅผ ๋Œ ์ˆ˜ ์žˆ๋‹ค. // next.config.js const nextConfig = { reactStrictMode: false, }

mac ์—์„œ rbenv install ์—๋Ÿฌ ํ•ด๊ฒฐ : ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

mac ์—์„œ react-native ํ™˜๊ฒฝ ์„ธํŒ… ๊ณผ์ •์—์„œ rbenv ๋ฅผ ์„ค์น˜ํ•ด์•ผํ•˜๋Š”๋ฐ, rbenv ๊นŒ์ง€ ์„ค์น˜ ์ดํ›„ bundler๋ฅผ ์„ค์น˜ํ•˜๋Š” ๊ณผ์ •์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚ฌ๋‹ค. ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. ๊ฒ€์ƒ‰ ๋์— ์ฐพ์€ ๋ฐฉ๋ฒ•์€ ์„ค์น˜์ดํ›„ .zshrc ์— ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•ด์ค˜์•ผ ํ•œ๋‹ค๋Š” ๊ฑธ ๊นจ๋‹ฌ์•˜๋‹ค. ใ…Ž vim ~/.zshrc // .zshrc ํŒŒ์ผ ์—ด๊ธฐ // ํ•ด๋‹น ํŒŒ์ผ์—์„œ ์•„๋ž˜ ์ฝ”๋“œ ์ถ”๊ฐ€ (์ถ”๊ฐ€: i, ์ €์žฅ+๋‹ซ๊ธฐ๋Š” : wq) [[ -d ~/.rbenv ]] && \ export PATH=${HOME}..

yarn : ์ด ์‹œ์Šคํ…œ์—์„œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†์œผ๋ฏ€๋กœ C:\Program Files\nodejs\yarn.ps1 ํŒŒ์ผ์„ ๋กœ๋“œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

1. ๋ฌธ์ œ ๋ฐœ์ƒ yarn ์œผ๋กœ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋ฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋‚˜ํƒ€๋‚ฌ๋‹ค. Window ๋‚ด์—์„œ ์ •์ฑ… ์„ค์ •์ด ์ œํ•œ๋˜์–ด์žˆ๋‹ค๋ฉด, yarn๊ฐ™์€ ์™ธ๋ถ€ ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ๋ฏฟ์„ ๋งŒํ•œ ์Šคํฌ๋ฆฝํŠธ์ธ์ง€ ์•Œ ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์‹คํ–‰์„ ์•ˆํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ํŠนํžˆ, .ps1xml, .psm1์„ ๋น„๋กฏํ•œ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์˜ ์‹คํ–‰์„ ์ œํ•œํ•œ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ๊ธฐ๋ณธ๊ฐ’์ด ํด๋ผ์ด์–ธํŠธ์šฉ์€ Restricted, ์„œ๋ฒ„์šฉ์€ RemoteSigned๋กœ ๋˜์–ด์žˆ๋‹ค๊ณ  ํ•œ๋‹ค. 2. ํ•ด๊ฒฐ ๋ฐฉ์•ˆ windows ์—์„œ ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ ์ •์ฑ…์„ ๋ณ€๊ฒฝํ•ด์ค€๋‹ค. ๋งŒ์•ฝ ํ˜„์žฌ ์ƒํƒœ๊ฐ€ Restricted๋กœ ์ œํ•œ์ด ๋˜์–ด์žˆ๋‹ค๋ฉด, yarn ์—์„œ ์ œ๊ณต ๋˜๋Š” ์ผ๋ถ€ ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์‹คํ–‰์ด ์•ˆ๋˜๋Š” ๋“ฏ ํ•˜๋‹ค. ์ฆ‰, Restricted ๋ฅผ RemotedSigned ๋กœ ๋ณ€๊ฒฝ ํ•ด์ค€๋‹ค๋ฉด yarn ๋„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค..

[React-native] While trying to resolve module `idb` from file ...

firebase ์—ฐ๋™ ํ›„ ์‹คํ–‰์‹œ ์ด๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€๋‹ค. While trying to resolve module 'idb' from file….this package itself specifies a `main` module field that could not be resolved firebase ๋ฒ„์ „ ๋ฌธ์ œ์ธ๊ฒƒ ๊ฐ™๋‹ค. @9.6.11๋กœ ์žฌ์„ค์น˜ ํ•ด์ฃผ๋‹ˆ ์—๋Ÿฌ๊ฐ€ ์‚ฌ๋ผ์กŒ๋‹ค. npm uninstall firebase npm install firebase@9.6.11 ์žฌ์„ค์น˜ ํ›„ ์žฌ์‹คํ–‰ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

[React Error] Invalid options object. React Refresh Plugin has been initialized using an options object that does not match the API schema.

๊ฐ€๋” ์•„๋ฌด๊ฒƒ๋„ ์•ˆํ•˜๊ณ  npx๋กœ ๋ฆฌ์•กํŠธ ์„ค์น˜ ํ›„ npm start๋ฅผ ํ•˜๋ฉด ์ด๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค. Would you like to run the app on another port instead? ... yes Invalid options object. React Refresh Plugin has been initialized using an options object that does not match the API schema. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! memory-game@0.1.0 start: `react-scripts start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the memor..

Error] findDOMNode is deprecated in StrictMode

1. ์—๋Ÿฌ ๋ฐœ์ƒ ์›์ธ react-draggable์„ ์“ธ ์ผ์ด ์ƒ๊ฒจ์„œ ์‚ฌ์šฉํ•˜๋˜ ์ค‘, ๋™์ž‘์€ ์ œ๋Œ€๋กœ ์ž‘๋™ํ–ˆ์œผ๋‚˜ ์ฝ˜์†”์— ์—๋Ÿฌ๊ฐ€ ๋–ด๋‹ค. ๋ณด๋‹ค์‹œํ”ผ findDOMNode ๋Š” StrictMode์—์„œ ์ œ๊ฑฐ๋˜์—ˆ๋‹ค๋Š” ๋‚ด์šฉ์ด๋‹ค. StricMode๋Š” React16์—์„œ ์ถ”๊ฐ€๋œ ๋ชจ๋“œ๋กœ ์ƒ๋ช…์ฃผ๊ธฐ์— ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ์˜ค๋ฅ˜๋ฅผ ๋ฐœ์ƒ์‹œํ‚ค๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ณ ์ž ํ•œ๋‹ค๊ณ  ํ•œ๋‹ค. ์ฐธ์กฐ : https://ko.reactjs.org/docs/strict-mode.html Strict ๋ชจ๋“œ – React A JavaScript library for building user interfaces ko.reactjs.org react-draggable ๊ฐ™์€ ๊ฒฝ์šฐ ์ง์ ‘ ๊ฐœ์ฒด๋ฅผ ์ปจํŠธ๋กคํ•˜๋‹ค ๋ณด๋‹ˆ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ์ธ ๊ฒƒ ๊ฐ™๋‹ค. 2. ํ•ด๊ฒฐ์ฑ… 2-1. StrictMode ํ•ด์ œ ..

[MongoDB] MongooseServerSelectionError

- ์—๋Ÿฌ ๋‚ด์šฉ MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/ at NativeConnection.Connection.openUri (D:\_personal\____study\reactstud..

๋ฐ˜์‘ํ˜•