20 Oct 16:40:37 - [nodemon] v0.7.10
20 Oct 16:40:37 - [nodemon] to restart at any time, enter `rs`
20 Oct 16:40:37 - [nodemon] watching: /my/proyect/server
20 Oct 16:40:37 - [nodemon] exception in nodemon killing node
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Object.watchFileChecker.check (/usr/lib/node_modules/nodemon/nodemon.js:160:6)
at ready (/usr/lib/node_modules/nodemon/nodemon.js:49:22)
at /usr/lib/node_modules/nodemon/nodemon.js:63:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
20 Oct 16:40:37 - [nodemon] reading ignore list
20 Oct 16:40:37 - [nodemon] exception in nodemon killing node
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at fs.watch (fs.js:1076:11)
at checkTimer (/usr/lib/node_modules/nodemon/nodemon.js:467:27)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
๋ ธ๋ ๋ฒ์ ?
๋ํ ์ฌ์ฉ ์ค์ธ(ํ ์คํธ์ฉ) ๊ฐ๋จํ ํ ์คํธ ์ผ์ด์ค ์คํฌ๋ฆฝํธ๋ฅผ ์ ๊ณตํ ์ ์์ต๋๊น?
๋ ธ๋ 0.10.21์ ์ฌ์ฉํฉ๋๋ค. ๋ชจ๋ ์คํฌ๋ฆฝํธ์์ ์ค๋ฅ๋ฅผ ์์ฑํฉ๋๋ค.
#144์ ๊ฐ์ ๋ฌธ์ ์ธ๊ฐ์? ๋๋ ์ด๊ฒ์ ๋ด Mac์์ ๋ณต์ ํ ์ ์์ต๋๋ค.
๋์ผํ์ง ์๊ณ ๋จ์ผ ํ๋ก์ธ์๋ฅผ ์คํํ๋ ๊ฒ์ด ๋ค๋ฆ ๋๋ค. ๋ค๋ฅธ ํ๋๋ ํด๋ผ์ฐ๋๊ฐ ์๋ ๋ค์ค ํ๋ก์ธ์์์ ์คํ๋ฉ๋๋ค.
์ค๋ ์ฌ๋ฌ ์ฑ(express, restify)์์ ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
๋
ธ๋JS: v0.10.21
ElementaryOS ๋ฒ์ : 0.2 "Luna"( 64๋นํธ)
๊ธฐ๋ฐ: Ubuntu 12.04( "์ ํํ")
์ปค๋ 3.5.0-43-์ผ๋ฐ
11 Nov 17:32:38 - [nodemon] v0.7.10
11 Nov 17:32:38 - [nodemon] to restart at any time, enter `rs`
...
11 Nov 17:32:38 - [nodemon] exception in nodemon killing node
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Object.watchFileChecker.check (/home/.../node_modules/nodemon/nodemon.js:160:6)
at ready (/home/.../node_modules/nodemon/nodemon.js:49:22)
at /home/.../node_modules/nodemon/nodemon.js:63:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
๋ณ๋ค:
npm install nodemon
./node_modules/.bin/nodemon app.js
app.js(http://nodejs.org/์์)
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
CoffeeScript์ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค --watch ./node_modules/.bin/coffee --watch app/
/home/.../node_modules/coffee-script/lib/coffee-script/command.js:334
throw e;
^
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at watchDir (/home/.../node_modules/coffee-script/lib/coffee-script/command.js:299:27)
at /home/.../node_modules/coffee-script/lib/coffee-script/command.js:102:11
at Object.oncomplete (fs.js:107:15)
๋ ธ๋ 0.10.21์ด ์๋ Ubuntu 13.10์์ coffeescript๋ฅผ ์ฌ์ฉํ๋ compound.js ํ๋ก์ ํธ์์ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
$ nodemon server.coffee
27 Nov 21:40:14 - [nodemon] v0.7.10
27 Nov 21:40:14 - [nodemon] to restart at any time, enter `rs`
27 Nov 21:40:14 - [nodemon] watching: /home/chok/work/edf/bluetic/src
27 Nov 21:40:14 - [nodemon] exception in nodemon killing node
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Object.watchFileChecker.check (/usr/local/lib/node_modules/nodemon/nodemon.js:160:6)
at ready (/usr/local/lib/node_modules/nodemon/nodemon.js:49:22)
at /usr/local/lib/node_modules/nodemon/nodemon.js:63:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
๋๊ตฐ๊ฐ nodemon์ dev ๋ฒ์ ์ผ๋ก ์ด๊ฒ์ ํ ์ ์์ต๋๊น? ์ ๋ ๋ง์ ๋ถ๋ถ์ ๋ณ๊ฒฝํ์ผ๋ฉฐ ์ ๋ฒ์ ์์ ์ด๋ฌํ ๋ชจ๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐ ์ง์คํ๋ ค๊ณ ๋ ธ๋ ฅํ๊ณ ์์ต๋๋ค.
npm install -g nodemon@dev
์ฌ์ฉํ์ฌ ์ค์นํ ์ ์์ต๋๋ค.
์ง๊ธ์ ์ด์ ๋ฅผ ๋ชจ๋ฆ ๋๋ค. ์ต์ ์์ ์ ์ธ nodemon npm ๋ฒ์ ์ฌ์ฉ. ๋ํ coffeescript --watch์ ๋์ผํ ๋ฌธ์ ๊ฐ ์์๊ณ ์ด๊ฒ์ ์ง๊ธ๋ ์๋ํฉ๋๋ค. ๋ ธ๋ ์ ๋ฐ์ดํธ๊ฐ ์๊ณ npm ์ค์น ๋ชจ๋๊ณผ ๋ฐฐํฌํ ์ ๋ฐ์ดํธ๋ง ์์ผ๋ฉด ๋ฉ๋๋ค.
๋์ผํ ์ค๋ฅ๊ฐ ์์ง๋ง ํ๋ก์ธ์ค๊ฐ ์ค์ง๋ฉ๋๋ค.
$ nodemon server.coffee
3 Dec 15:32:42 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
@chok nodemon ์ ์คํ ์ค์ธ ๋์ผํ ๋๋ ํ ๋ฆฌ์์ ๋ค์์ ์คํํ๊ณ ๊ฒฐ๊ณผ๋ฅผ ๋ถ์ฌ๋ฃ์ ์ ์์ต๋๊น?
find . | wc
์ค์ ๋ก ์ด ๋ฌธ์ ์ ์์ธ์ด ๋ฌด์์ธ์ง ์์๋ณด๋ ค๊ณ ํฉ๋๋ค.
๊ฒฐ๊ณผ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
$ find . | wc
7677 7677 542965
์ข์์, ๊ทธ๊ฒ์ 7600๊ฐ์ ํ์ผ๋ก ์๊ณ๋ ๋ฐ์ธ๋ฉํ๋ ค๊ณ ํฉ๋๋ค.
tree
๋ฅผ ์คํํ๊ณ ๊ฒฐ๊ณผ๋ฅผ http://pastie.org/์ ๋ฃ์ ์ ์์ต๋๊น(๋ฐฉ๋ํ ๊ฒ์ด๊ธฐ ๋๋ฌธ์).
Pasteie๋ ๊ทธ๊ฒ์ด ๋๋ฌด ์ปค์(64kb ์ด์) ๊ฒฐ๊ตญ ํ๋จ์ ์๋ ํ ์คํธ๊ฐ ๋ง์์ ๋ค์ง ์๋๋ค๊ณ ๋งํ์ต๋๋ค :p(๋ชจ๋ ๋ถ์ฌ๋ฃ๊ธฐ๋ ์ฐ๋ฆฌ ์์ ์ ๋๋ค. ). ๋ด ํ๋ก์ ํธ์ ๊ด๋ จ๋ ์ผ๋ถ ๋ถ๋ถ์ ์ ๊ฑฐํ์ต๋๋ค. ๊ทธ๊ฑด ๊ทธ๋ ๊ณ , ๋๋ถ๋ถ์ ํ์ผ์ ๋ฌผ๋ก node_modules์ ์์ต๋๋ค.
์์ง์์ ์ฐพ์ ์ ์์ต๋๋ค : https://gist.github.com/chok/7774318
์ข์์, ์ ์๊ฐ์ ์ด๊ฒ์ ๋ชจ๋ํฐ๋ง๋๋ ํ์ผ์ ์์ ์์ ํ ์ฐ๊ฒฐ๋ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค(๊ฐ ๊ฐ๋ณ ํ์ผ์ ๋ฐ์ธ๋ฉํด์ผ ํ๊ธฐ ๋๋ฌธ์). ๊ธฐ๋ณธ์ ์ผ๋ก node_modules ๋ฐ .git ๋๋ ํ ๋ฆฌ๋ฅผ ๋ฌด์ํ๋ ๊ฒ์ ๋ํด ์๊ฐํ๊ณ ์์์ง๋ง ๋ฌด์ ๋ช ๋ น์ผ๋ก ์๋ํด ๋ณผ ์ ์์ต๋๊น(์์ง 0.9.x๋ฅผ ์คํ ์ค์ด๋ผ๊ณ ๊ฐ์ ):
nodemon -i node_modules
๋ฌผ๋ก ์ด ์์ ์ ๋งค๋ฒ ์ํํ ํ์๋ ์์ผ๋ฉฐ ์ด๊ฒ์ด ๋ฌธ์ ์ธ์ง ํ์ธํ๋ ค๊ณ ํฉ๋๋ค.
์๋ํ์ง ์์ต๋๋ค :(
$ nodemon -i node_modules/ server.coffee
3 Dec 20:52:32 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
๋๋ ๋ํ ์๋ํฉ๋๋ค :
$ nodemon -w app/* server.coffee
3 Dec 20:53:32 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
๋๊ฐ์ ๋ช
๋ น์ ์คํํ ์ ์์ง๋ง --dump
์ถ๊ฐํ๊ณ ์๋ต์ ๋ณด๋ด์ฃผ์ญ์์ค(๋ฌด์ ๋ฒ์ ์ ์ํํ ๋).
๋ณ๊ฒฝ ์ฌํญ์ด ์์ต๋๋ค.
$ nodemon -i node_modules/ server.coffee --dump
3 Dec 21:17:18 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
ํ , ์ฃ์กํฉ๋๋ค. ์คํฌ๋ฆฝํธ ์์ --dump
๋ฅผ ๋ถ์ผ ์ ์์ต๋๊น? ๊ทธ๋ฌ๋ฉด ๊ตฌ์ฑ ๋คํ๊ฐ ์ ๊ณต๋ ๊ฒ์
๋๋ค.
๋๋ ์ด๋ฏธ ๋ ๋ค ์๋ํ์ต๋๋ค :(
$ nodemon -i node_modules/ --dump server.coffee
3 Dec 21:25:35 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
์๋
ํ์ธ์. ๋ํํ ์๋ฆฌ๋ฅผ ํ๊ณ ์ถ์ง๋ ์์ง๋ง ์ด ์ค๋ฅ๊ฐ ๋ฐ์ํ์ ๋ ์์คํ
์์ max_user_watches
๋ฅผ ๋๋ ค ์์ ํ์ต๋๋ค. ๋๋ ๋ค๋ฅธ ์ผ์ด ์ผ์ด๋๊ณ ์๋์ง ํ์ธํ๊ธฐ ์ํด ์ด ์ค๋ ๋๋ฅผ ๋ณด๊ณ ์์์ต๋๋ค.
@taylorjbrennan ๋ค, ๊ทธ๋ ๊ฒ ํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋๋ค๋ ๊ฒ์ ์๋๋ค. ํ์ง๋ง @chok ์ด ์ผ๊ด๋๊ฒ ๋ณต์ ํ ์ ์๋ ๋์ ์ ๋ ์ฌ์ฉ์๊ฐ max_user_watches
io ๋ง๋ฒ์ ์ํํ ํ์ ์์ด nodemon์ ์์ ํ๋ ๋ณ๊ฒฝ์ ์ถ๊ตฌํ๊ณ ์์ต๋๋ค.
@remy ๊ต์ฅํด , ๋๋ ๊ทธ๊ฒ์ ๋ณผ ์ ์๊ธฐ๋ฅผ ๊ณ ๋ํ๋ค.
@chok [email protected]์ผ๋ก ๋ค์ ์๋ํ ์ ์์ต๋๊น? - ์ด์ nodemon์ ๊ธฐ๋ณธ์ ์ผ๋ก .git ๋ฐ node_modules/**/node_modules๋ฅผ ๋ฌด์ํ๋ฏ๋ก ์๊ณ ์๋ ํจ์ฌ ๋ฎ์์ผ ํฉ๋๋ค(์ด๊ฒ์ด ์ฌ์ ํ ๋ฌธ์ ์ธ ๊ฒฝ์ฐ ๋ค์ ์ด๊ฒ ์ต๋๋ค) .
๋๋ ๋ํ ๊ฐ์งํ๋ ค๊ณ ๊ฑฐ์ผ watch ENOSPC
์ค๋ฅ ๋ฐ ์ฆ๊ฐ์ ๋ํ ๋ฉ์์ง๋ฅผ ์์ฝ max_user_watches
. ์ด์์ ์ด์ง๋ ์์ง๋ง ๋ด๊ฐ ์ค์ ๋ก ํ ์ ์๋ ์ผ์ ๋ ์ด์ ์์ต๋๋ค.
๋ ์ด์ ์ด ๋ฉ์์ง๊ฐ ์์ต๋๋ค :) ํ์ง๋ง ์ด์ #245์ ๋ฌธ์ ๊ฐ ์ค๋ช ๋์ด ์์ต๋๋ค.
๋ฐฉ๊ธ์ด ๋ฌธ์ ๊ฐ ์์๊ณ ์์คํ ์์ ๋๋ฌด ๋ง์ ํ์ผ์ด ์ด๋ ค์๋ ๋ฌธ์ ์์ต๋๋ค. (Sublime Text๋ ํ์ฉํ๋ฉด ๋ง์ ํ์ผ์ ์ฌ๋ ๊ฒ์ ์ข์ํฉ๋๋ค)
Sublime 2 nodemon์์ ๋ง์ ํ์ผ์ด ์๋ ๋๋ ํ ๋ฆฌ๋ฅผ ์ด์ ๋ง์ ๋ ์ด์ ์๋ํ์ง ์๊ณ ์ฐธ์กฐ๋ ์ค๋ฅ๋ฅผ ๋ฑ์ด๋ ๋๋ค. Sublimes์ "ํด๋ ์ด๊ธฐ" ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์์ผ๋ก์จ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์์ต๋๋ค. @eyce9000 ํํธ ๊ฐ์ฌํฉ๋๋ค.
@timtips ๋ sublimetext3 ๋ฐ nodemon v1.3.1๊ณผ ๋์ผํฉ๋๋ค.
@baio ๋ค์ ํ์ธํ ์ ์์ต๋๋ค. [email protected] ์ ์์ต๋๋ค - ์ํํ @1.3.0-1์ด ์์ต๋๋ค - ํ์ง๋ง npm์์ ์์ฐ ์ค์ด ์๋๋๋ค(npm ๋ฒ์ ๋ ํ์ธํ ์ ์์ต๋๊น)?
๊ทธ๋ ์ด ๋ฒ๊ทธ๋ฅผ ๋ซ์ ์ ์์ต๋๊น? nodemon๊ณผ nodejs์ ์ ๋ฒ์ ์ผ๋ก ์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ง๋ง ์์ ํ ํด๊ฒฐ๋์๋ค๊ณ ๋งํ ์๋ ์์ต๋๋ค. ๋ ์ด์ ์์ฃผ ๋ฐ์ํ์ง ์๋๋ค๊ณ ํ ์ ์์ต๋๋ค.
@alejonext npm install -g nodemon@dev
์๋ํ ์ ์์ต๋๊น - 1.2.1์ ์๋ ๋ช ๊ฐ์ง ๋ณ๊ฒฝ ์ฌํญ์ ์ ์ฉํ์ต๋๋ค.
์ด ์ค๋ฅ๋ ์ค์ ๋ก "Error NO disk SPaCe"๋ฅผ ์๋ฏธํ์ง๋ง ๋ชจ๋ํฐ๋ง ์ค์ธ ํ์ผ ์์ ๊ด๋ จ์ด ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ์ด ์๋ ๊ฐ์ ์ฝ๋๋ฅผ ๋ณ๊ฒฝํ์ฌ ์ค์ฌ์ผ ํฉ๋๋ค...
@remy Works ์๋ฒฝํฉ๋๋ค :)
๋ฌ์ฝคํ. ์ด๋ฒ ์ฃผ์ ๋ง์ ๋ฒ๊ทธ ์์ ๊ณผ ํจ๊ป 1.3.0์์ npm์ผ๋ก ์์ ์ ์ธ ๋ฆด๋ฆฌ์ค๊ฐ ์์ ๊ฒ์ ๋๋ค.
@remy ๋ ์๋ต ์๊ฐ์ ๋๋์ต๋๋ค. ๊ฐ์ฌ ํด์!
@๋ ๋ฏธ
nodemon ํฌ๋ง ๋
ธ๋์ ์์ธ
์ค๋ฅ: ENOSPC ๋ณด๊ธฐ
errnoException์์ (fs.js:1030:11)
FSWatcher.start์์ (fs.js:1062:11)
Object.fs.watch์์ (fs.js:1087:11)
๋
ธ๋ v0.10.33
OS: ๋ฆฌ๋
์ค ์ฐ๋ถํฌ
์ด ๋ช ๋ น์ผ๋ก์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค. https://github.com/ember-cli/ember-cli/issues/1240#issuecomment -47855317
ํ์ง๋ง ๊ถ์ฅ๋๋ ๋ฐฉ๋ฒ์ผ๋ก ํจํค์ง๋ฅผ ์ ๋ฐ์ดํธํ๊ณ ์์ต๋๊น?
์ ์ด์ ์ ์ด๋ ๊ฒ ๋๊ฑด์ง ๊ถ๊ธํฉ๋๋ค. ๋
ธ๋ ๋ฒ์ ๊ด๋ฆฌ์๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๋ค.
๋
ธ๋ 0.12.0
npm 2.7.0
์ ๋ฒ 0.2.0
@ahnbizcad
์๋ง๋ ๋๋ฌธ์
https://github.com/joyent/node/wiki/API-changes-between-v0.10-and-v0.12#resource-management ?
์์คํ ์ ์ฌ์ฉ์๊ฐ ๋ณผ ์ ์๋ ํ์ผ ์์ ์ ํ์ด ์์ต๋๋ค. Dropbox์ ๊ฐ์ ๋ค๋ฅธ ํ๋ก๊ทธ๋จ๊ณผ ํจ๊ป Grunt๋ฅผ ์คํํ๋ ๊ฒฝ์ฐ ์๊ณ๊ฐ ๋งค์ฐ ๋นจ๋ฆฌ ์์ง๋ ์ ์์ต๋๋ค.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
"nodemon": "^1.4.1"
๋ฐ "node": "0.12.7"
๋ํด ๋ค์๊ณผ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ์ค๋ง:
#625๋ก ์๋ํ์ญ์์ค
2015๋ 9์ 8์ผ ํ์์ผ 16:20 Wesley Queiroz [email protected] ์ ๋ค์๊ณผ ๊ฐ์ด ์ผ์ต๋๋ค.
"nodemon": "^1.4.1" ๋ฐ "node": "0.12.7" [์ด๋ฏธ์ง:
:์ค๋งํ:]โ
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ฑฐ๋ GitHub์์ ํ์ธํ์ธ์.
https://github.com/remy/nodemon/issues/214#issuecomment -138598438.
alpha
์๋ํ์ง๋ง ์ฌ์ ํ ENOSPC
๋ฐ๊ณ ์์ต๋๋ค ...
๋ด sysctl.conf
์๋ fs.inotify.max_user_watches=10000
์์ต๋๋ค.
524288
ํ๋ฉด ์๋ํ์ง๋ง "dev-server"์์๋ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.
๋ช ๊ฐ์ ํ์ผ์ ๋ณด๋ ค๊ณ ํฉ๋๊น? ์ฆ, ๋น์ ์ ๋ฐ์ ์ผ๋ง๋ ๋ง์
์์
๋๋ ํ ๋ฆฌ?
2015๋ 9์ 8์ผ ํ์์ผ 17:37 Wesley Queiroz [email protected]์์ ๋ค์๊ณผ ๊ฐ์ด ์ผ์ต๋๋ค.
์ํ๋ก ์๋ํ์ง๋ง ์ฌ์ ํ ENOSPC๋ฅผ ์ป๊ณ ์์ต๋๋ค ...
๋ด sysctl.conf์๋ fs.inotify.max_user_watches=10000์ด ์์ต๋๋ค.
524288๋ก ๋ณ๊ฒฝํ๋ฉด ์๋ํ์ง๋ง "dev-server"์์๋ ํ ์ ์์ต๋๋ค.
๊ทธ๊ฒ์ ๋ณ๊ฒฝํฉ๋๋ค.โ
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ฑฐ๋ GitHub์์ ํ์ธํ์ธ์.
https://github.com/remy/nodemon/issues/214#issuecomment -138624285.
๋ง์ง๋ ์๊ณ ์ต๋ 30๊ฐ
ํ์ง๋ง nodemon์ ํ๋ก์ ํธ์ ๋ฃจํธ์์ node_modules
๋ฅผ ๋ณด๋ ค๊ณ ํฉ๋๋ค.
๋ค์์ nodemon์ ์ ๋ฌ๋ ๊ตฌ์ฑ์
๋๋ค(์ ๋ ๋
ธ๋ ๋ชจ๋๋ก ์ฌ์ฉํ๊ณ ์์ต๋๋ค).
nodemon({
script: 'server/server.js',
watch: [
'server/',
'common/'
],
ext: 'js json coffee'
});
์๋ฒ ํด๋์๋ ๋ค์์ด ์์ต๋๋ค.
7 ์ปคํผ ํ์ผ
5๊ฐ์ json ํ์ผ
๊ทธ๋ฆฌ๊ณ common ํด๋์๋ 1๊ฐ์ json ํ์ผ๋ง ์์ต๋๋ค...
์... find . | wc -l
์คํํ๋ฉด ๊ทธ ์ซ์๊ฐ ๋ฌด์์ ์ ๊ณตํฉ๋๊น? ๊ธฐ๋ณธ์ ์ผ๋ก node_modules
๋ฅผ ๋ฌด์ํด์ผ ํ์ง๋ง ๊ณ ๋ ค๋์ง ์์ ์ ์์ต๋๋ค.
ํ๋ก์ ํธ ๋ฃจํธ์์ find . | wc -l
๋ฅผ ์คํํ๋ฉด 18266
๋์ง๋ง node_modules
๋ฐ bower_components
ํ๋ฉด 320
๋ฉ๋๋ค.
์ข์, ๊ทธ๋์ ๋๋ ์๊ณ๊ฐ node_modules
ํฌํจ _is_ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. ์ด๊ฒ์ #625 ๋ฆฌํฉํฐ๋ง์ ์ผ๋ถ์ด๋ฉฐ ์์ ํด์ผ ํฉ๋๋ค.
@wesleycoder ๋ ์ต์ nodemon@dev
(๋ฒ์ 1.5.0-alpha4
์ด์ด์ผ ํจ)๋ก ์๋ํ๊ณ DEBUG=nodemon <your normal nodemon command>
ํ ๋ค์ ์ ์ฒด ์ถ๋ ฅ์ ๋ถ์ฌ๋ฃ์ ์ ์์ต๋๋ค.
์!
ํจ๊ณผ๊ฐ์๋ค!
์ค๋ฅ๊ฐ ์์ต๋๋ค!
๊ฐ์ฌ ํด์!
์ด๊ฒ์ ์ฌ์ฉ์๊ฐ ํ์ผ์ ๋ณผ ์ ์๋ ์์คํ
๋ฒ์๋ฅผ ๋ฒ์ด๋ฌ๊ธฐ ๋๋ฌธ์ผ ์ ์์ต๋๋ค. ์ฐ๋ถํฌ์์ ๋ค์ ๋ช
๋ น์ค์ ์ฌ์ฉํ ์ ์์ต๋๋ค
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
๋๋ ์๋
npm dedupe
์ ์ฌํ ์ด ์ ๋
@ankibalyan @uttampanara
ํจ๊ณผ๊ฐ์๋ค !
์์ฝ fs.inotify.max_user_watches=524288 | sudo ํฐ -a /etc/sysctl.conf && sudo sysctl -p
๋๋ฅผ ์ํด ์๋ํฉ๋๋ค!
์์ฝ fs.inotify.max_user_watches=524288 | sudo ํฐ -a /etc/sysctl.conf && sudo sysctl -p
์ฌ๊ธฐ๋ ๋ง์ฐฌ๊ฐ์ง! :+1:
์์ฝ fs.inotify.max_user_watches=524288 | sudo ํฐ -a /etc/sysctl.conf && sudo sysctl -p
์ด ๋ช ๋ น์ ์คํ
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
๋ ๋ค๋ฅธ ๊ฐ๋ฅํ ์๋ฃจ์
์ ๋ฃจํธ ํด๋์ nodemon.json
๊ตฌ์ฑ ํ์ผ์ ์ถ๊ฐํ๊ณ ๋ฌด์ ํจํด์ ์ง์ ํ๋ ๊ฒ์
๋๋ค. ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
nodemon.json
{
"ignore": [
"*.test.js",
"dist/*"
]
}
.git
, node_modules
, bower_components
, .nyc_output
, coverage
๋ฐ .sass-cache
๋ ๋ฌด์๋๋ฏ๋ก ๋ค์์ ์ํํ์ง ๋ง์ญ์์ค. ๊ตฌ์ฑ์ ์ถ๊ฐํ ํ์๊ฐ ์์ต๋๋ค.fs notify ํธ๋ฆญ์ ๋์ปค ์ปจํ ์ด๋์์ ์๋ํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค... ์ ์ด๋ Alpine 3.8์์๋ ๊ทธ๋ ์ง ์์ต๋๋ค. ๋์ผํ ENOSPC ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋๊ตฌ๊ฐ ๋ ์ด์ ์ฌ์ฉ๋์ง ์๊ณ ์ฌ์ ํ ๋ ๊ฑฐ์ ์ ํ์ ์ ์ง ๊ด๋ฆฌํด์ผ ํ๋ฏ๋ก ์ค์ํด์ง๊ณ ์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ฒ์๋ฌผ์ ์ฌ์ฉ ๊ฐ๋ฅํ ์๊ณ์ ์๋ฅผ ๋๋ฆฌ๊ธฐ ์ํด ์ด๊ฒ์ ์คํํ๋ ๊ฒ์ด ์ข์ต๋๋ค.