[Node.js μ—λŸ¬] node:events:491 throw er; // Unhandled 'error' event ^

fejiguΒ·2024λ…„ 1μ›” 9일
1

React Native Project

λͺ©λ‘ 보기
14/20

πŸ“λ§ˆμ£Όν•œ μ—λŸ¬

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
console.log(frontendjigu( β˜•οΈ, πŸ“±); // true

0개의 λŒ“κΈ€