[Node.js ์—๋Ÿฌ] node:events:491 throw er; // Unhandled 'error' event ^

fejiguยท2024๋…„ 1์›” 9์ผ
1

React Native Project

๋ชฉ๋ก ๋ณด๊ธฐ
14/21

๐Ÿ“๋งˆ์ฃผํ•œ ์—๋Ÿฌ

Logs for your project will appear below. Press Ctrl+C to exit.
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: std::__1::system_error: open: /Users/anjisu/Documents/OLHSO_Client_Front: Operation not permitted
    at BunserBuf.<anonymous> (/Users/anjisu/Documents/OLHSO_Client_Front/node_modules/fb-watchman/index.js:99:23)
    at BunserBuf.emit (node:events:513:28)
    at BunserBuf.process (/Users/anjisu/Documents/OLHSO_Client_Front/node_modules/bser/index.js:292:10)
    at /Users/anjisu/Documents/OLHSO_Client_Front/node_modules/bser/index.js:247:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
Emitted 'error' event on WatchmanWatcher instance at:
    at Client.<anonymous> (/Users/anjisu/Documents/OLHSO_Client_Front/node_modules/metro-file-map/src/watchers/WatchmanWatcher.js:107:12)
    at Client.emit (node:events:513:28)
    at BunserBuf.<anonymous> (/Users/anjisu/Documents/OLHSO_Client_Front/node_modules/fb-watchman/index.js:111:12)
    at BunserBuf.emit (node:events:513:28)
    at /Users/anjisu/Documents/OLHSO_Client_Front/node_modules/bser/index.js:249:12
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  watchmanResponse: {
    error: 'std::__1::system_error: open: /Users/anjisu/Documents/OLHSO_Client_Front: Operation not permitted',
    version: '2023.01.30.00'
  }
}

Node.js v18.13.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

โ†’ ์—๋Ÿฌ์›์ธ : ๋””๋ ‰ํ† ๋ฆฌ์— ์ ‘๊ทผํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๊ถŒํ•œ์ด ์—†๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค.
๊ฒ€์ƒ‰์„ ํ†ตํ•ด Watchman ์žฌ์„ค์น˜, ๊ถŒํ•œ ๋ณ€๊ฒฝ, .watchmanconfig ํŒŒ์ผ ์ƒ์„ฑ ๋“ฑ ๋‹ค์–‘ํ•œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•๋“ค์„ ์ œ์‹œํ•˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.
๋น ๋ฅด๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋ผ ์ƒ๊ฐํ–ˆ๋Š”๋ฐ, ์ƒ๊ฐ๋ณด๋‹ค ์‹œ๊ฐ„์ด ๊ฑธ๋ ธ๊ณ  ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.




๐Ÿ“ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

โœ”๏ธ ๋‹ค์‹œ ์ธ์ง€ํ•œ ์›์ธ : macOS์˜ ๋ณด์•ˆ ์ œํ•œ ์‚ฌํ•ญ์œผ๋กœ watchman์ด ๋””์Šคํฌ ์—‘์„ธ์Šค ๊ถŒํ•œ์„ ๋ฐ›์ง€ ๋ชปํ•œ ์ƒํƒœ
โœ”๏ธ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•:

watchman watch-del-all
watchman shutdown-server
...
npx expo start

โ†’ ํ„ฐ๋ฏธ๋„์—์„œ ์œ„ ๋‘ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๊ณ , ๋‹ค์‹œ ๋นŒ๋“œ(npx expo start)ํ•ด๋ณด๋ฉด watchman์—๊ฒŒ ๋””์Šคํฌ ๊ถŒํ•œ์„ ์ค„์ง€ ๋ฌผ์–ด๋ณด๋Š” ์ฐฝ์ด ๋‚˜ํƒ€๋‚˜๊ณ  ํ™•์ธ์„ ๋ˆ„๋ฅด๋ฉด ๋‹ค์‹œ ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.

profile
์‹ ๊ทœ ์„œ๋น„์Šค์˜ ๊ธฐํš๋ถ€ํ„ฐ ๊ฐœ๋ฐœ, ์šด์˜๊นŒ์ง€ ์ „ ๊ณผ์ •์„ ๊ฒฝํ—˜ํ•œ ์ฃผ๋‹ˆ์–ด ๐Ÿ“ฑ

0๊ฐœ์˜ ๋Œ“๊ธ€