Closed
Description
Today I added a new directory to watch changing the number of tasks from 10 to 11 and suddenly the following warning appears:
> npm-watch
No task specified. Will go through all possible tasks
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
(node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [Transform]. Use emitter.setMaxListeners() to increase limit
[build:sass] [nodemon] 2.0.7
[build:server] [nodemon] 2.0.7
[build:server] [nodemon] watching path(s): server\**\*
[build:server] [nodemon] watching extensions: ts
[nodemon] starting `npm.cmd run -s build:server`
[build:html] [nodemon] 2.0.7
[build:html] [nodemon] watching path(s): client-widgets\**\*
[build:html] [nodemon] watching extensions: html
[build:html] [nodemon] starting `npm.cmd run -s build:html`
[build:widgets] [nodemon] 2.0.7
[build:widgets] [nodemon] watching path(s): client-widgets\**\*
[build:widgets] [nodemon] watching extensions: ts
[build:widgets] [nodemon] starting `npm.cmd run -s build:widgets`
[build:svg] [nodemon] 2.0.7
[build:svg] [nodemon] watching path(s): client\**\*
[build:svg] [nodemon] watching extensions: svg
[build:svg] [nodemon] starting `npm.cmd run -s build:svg`
[build:plugins] [nodemon] 2.0.7
[build:plugins] [nodemon] watching path(s): plugins\**\*
[build:plugins] [nodemon] watching extensions: ts
[build:plugins] [nodemon] starting `npm.cmd run -s build:plugins`
[build:client] [nodemon] 2.0.7
[build:client] [nodemon] watching path(s): client\**\*
[build:client] [nodemon] watching extensions: ts
[build:png] [nodemon] 2.0.7
[build:prepare] [nodemon] 2.0.7
[build:client] [nodemon] starting `npm.cmd run -s build:client`
[build:png] [nodemon] starting `npm.cmd run -s build:png`
[build:prepare] [nodemon] watching path(s): prepare\**\* common\**\*
[nodemon] watching extensions: ts
[nodemon] starting `npm.cmd run -s build:prepare`
[build:common] [nodemon] 2.0.7
[build:common] [nodemon] watching path(s): common\**\*
[build:common] [nodemon] watching extensions: ts
[build:common] [nodemon] starting `npm.cmd run -s build:common`
[build:ingest] [nodemon] 2.0.7
[build:ingest] [nodemon] watching path(s): ingest\**\*
[build:ingest] [nodemon] watching extensions: ts
[build:ingest] [nodemon] starting `npm.cmd run -s build:ingest`
[build:sass] [nodemon] clean exit - waiting for changes before restart
[build:common] [nodemon] clean exit - waiting for changes before restart
[build:prepare] [nodemon] clean exit - waiting for changes before restart
[build:svg] [nodemon] clean exit - waiting for changes before restart
[build:png] [nodemon] clean exit - waiting for changes before restart
[build:ingest] [nodemon] clean exit - waiting for changes before restart
[build:html] [nodemon] clean exit - waiting for changes before restart
[build:server] [nodemon] clean exit - waiting for changes before restart
[build:plugins] [nodemon] clean exit - waiting for changes before restart
[build:client] [nodemon] clean exit - waiting for changes before restart
[build:widgets] [nodemon] clean exit - waiting for changes before restart
The relevant section of package.json is:
"watch": {
"build:sass": {
"patterns": [
"client",
"client-widgets"
],
"extensions": "scss",
"delay": 500
},
"build:svg": {
"patterns": [
"client"
],
"extensions": "svg",
"delay": 500
},
"build:png": {
"patterns": [
"client"
],
"extensions": "png",
"delay": 500
},
"build:html": {
"patterns": [
"client-widgets"
],
"extensions": "html",
"delay": 500
},
"build:widgets": {
"patterns": [
"client-widgets"
],
"extensions": "ts",
"delay": 500
},
"build:client": {
"patterns": [
"client"
],
"extensions": "ts",
"delay": 500
},
"build:server": {
"patterns": [
"server"
],
"extensions": "ts",
"delay": 500
},
"build:plugins": {
"patterns": [
"plugins"
],
"extensions": "ts",
"delay": 500
},
"build:common": {
"patterns": [
"common"
],
"extensions": "ts",
"delay": 500
},
"build:prepare": {
"patterns": [
"prepare",
"common"
],
"extensions": "ts",
"delay": 500
},
"build:ingest": {
"patterns": [
"ingest"
],
"extensions": "ts",
"delay": 500
}
},
The 10 maximum tasks sound suspiciously as an hardcoded limit somewhere. Really don't know if this is a npm-watch or nodemon or node problem. Or do you have any suggestion to organize differently my build process? Thanks!
BTW, I'm preparing a small example to reproduce the problem.
Thanks!
mario