Comments (18)
from ember-cli-babel.
I'm getting a very similar error. I'm using ember-cli 2.5.0 with ember-cli-babel 5.1.6. I've seen this on OSX with Node 4.4.5 and RedHat with Node 0.12.
Here's my error:
% ember serve
(node) warning: possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at process.addListener (events.js:239:17)
at Object.<anonymous> (/Users/denchen/dev/ops-ui/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:449:9)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/denchen/dev/ops-ui/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-merge-trees/node_modules/can-symlink/index.js:1:73)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/denchen/dev/ops-ui/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-merge-trees/index.js:9:18)
Environment: development
Livereload server on http://localhost:49153
Serving on http://localhost:3000/
Build successful - 6821ms.
I'm not sure if it's an issue with a node_module or my code, and I'm not fluent enough in the world of Node to even begin to debug this.
from ember-cli-babel.
Seems related to tmp, unsure what we can do on our end.
from ember-cli-babel.
Speaking of /tmp, I only just noticed that a lot of directories are left over. After cleaning out /tmp and then starting Ember, there are 1700+ directories. After stopping & starting Ember again, there are 3400+ directories. Is this normal that files aren't being cleaned up?
from ember-cli-babel.
@denchen they should be cleaned up
from ember-cli-babel.
@denchen they should be cleaned up
Well, actually ones in system tmp are the result of persistent filters that do remain. project/tmp
should be cleanedup
from ember-cli-babel.
@stefanpenner Hmm, yeah, my <project>/tmp
folder is not being cleaned up. For now, I'm rm -rf tmp/
before each time I start Ember. Is there anything I can do to help narrow down the root cause?
from ember-cli-babel.
Make a reproduction and share it as an issue
from ember-cli-babel.
https://github.com/denchen/test-app
I've tried to remove as much fluff as possible and still have the /tmp
and EventEmitter issue. I could probably pare it down by removing even more packages if you so desire. Again, I'm seeing this with OSX + Node 4.4.5.
from ember-cli-babel.
@denchen thanks
from ember-cli-babel.
still have the /tmp
doesn't sound like a problem, that is the persistent cache. OS cleans it up periodically
from ember-cli-babel.
node 4.4x and 5.x didn't seem to have the leak when tested on https://github.com/denchen/test-app
A reproduction would help diagnose, but seems so far as not to reproduce for me. Would love something, to debug. Any more details would be great.
from ember-cli-babel.
@denchen was able to provide me with an example.
The problem appears to be (still confirming):
- more then 10 dependencies try to do cleanup when the process exists, one of which is
tmp
(there may be duplicates. - for some reason the limit of 10 is set, and is likely far to low a default
offenders:
./ember-suave/node_modules/temp/test/temp-test.js:process.addListener('exit', function() {
./ember-suave/node_modules/temp/lib/temp.js: process.addListener('exit', cleanupSync);
./ember-cli-postcss/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli/node_modules/bower/lib/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli/node_modules/temp/test/temp-test.js:process.addListener('exit', function() {
./ember-cli/node_modules/temp/lib/temp.js: process.addListener('exit', cleanupSync);
./ember-component-css/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-intl/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-data/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli-qunit/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli-moment-shim/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
./ember-cli-blanket/node_modules/broccoli-merge-trees/node_modules/can-symlink/node_modules/tmp/lib/tmp.js:process.addListener('exit', function _exit(code) {
from ember-cli-babel.
quick reproduction that also works on my machine..;
var count = 0;
for (var i = 0; i < 11; i++) {
process.addListener('exit', function() {
console.log('didExit', count++);
});
}
from ember-cli-babel.
I can think of two solutions:
- ember-cli can just set
process.setMaxListeners(1000);
- we can create an add-on that wraps
process.addListener
and ensures we never add more then intended.
I'm likely going to role with 1. but would love input.
from ember-cli-babel.
I tend to agree, although 1000
seems quite high as well.
from ember-cli-babel.
@Turbo87 is there a downside? I figure if someone has a real problem, it would need to grow behind that.
from ember-cli-babel.
just the gut feeling that the 10
might be there for a reason...
from ember-cli-babel.
Related Issues (20)
- Needs bump for TS v4.5 `import type` support
- hovering when lack of open curly brace HOT 2
- Optional Chaining in delete statement removes delete statement HOT 2
- deprecate is not available from `@ember/debug` pre 4.0.0 HOT 21
- Private property transpilation broken w/ externalHelpers enabled
- Cannot build Ember on ARM64 HOT 1
- `useBabelConfig` on fresh ember-app doesn't work HOT 1
- `Could not find module '@babel/runtime/helpers/esm/regeneratorRuntime'` in a fresh new app HOT 1
- Is there a way to opt out of ember-cli-babel entirely?
- Error: Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform. HOT 2
- [QUEST] v8 Release HOT 15
- Ember is undefined HOT 3
- Potential Security Vulnerabilities Detected in Package
- ember-cli-babel@8 breaks parallelization
- Remove the "class-properties" and "private-methods" plugins HOT 2
- `includeExternalHelpers` breaks parallel builds
- Missing information about compatibility for v8
- Option for enabling `onlyRemoveTypeImports` HOT 1
- JSON5 vulnerability in v7.x of ember-cli-babel HOT 3
- Please ensure that transform-class-properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-babel.