question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EventEmitter memory leak

See original GitHub issue

Upon using even the most basic 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false' I get the following errors:

(node) warning: possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:239:17)
    at module.exports (H:\Dev\node_modules\signal-exit\index.js:41:11)
    at module.exports.promise (H:\Dev\node_modules\execa\index.js:146:23)
    at H:\Dev\node_modules\exec-buffer\index.js:35:15

As soon as I remove the loader, everything is fine.

My webpack:

var webpack = require('webpack'),
    HtmlWebpackPlugin = require('html-webpack-plugin'),
    ExtractTextPlugin = require('extract-text-webpack-plugin'),
    helpers = require('./helpers');

module.exports = {
    entry: {
        'polyfills': './src/polyfills.ts',
        'vendor': './src/vendor.ts',
        'app': './src/main.ts'
    },

    resolve: {
        extensions: ['', '.js', '.ts']
    },

    module: {
        loaders: [
            {
                test: /\.ts$/,
                loaders: [
                    'awesome-typescript-loader',
                    'angular2-template-loader'
                ]
            },
            {
                test: /\.html$/,
                loader: 'html'
            },
            {
                test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
                loaders: [
                    'file?name=assets/[name].[hash].[ext]',
                    'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
                ]
            },
            {
                test: /\.css$/,
                exclude: helpers.root('src', 'app'),
                loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
            },
            {
                test: /\.css$/,
                include: helpers.root('src', 'app'),
                loader: 'raw'
            }
        ]
    },

    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: ['app', 'vendor', 'polyfills']
        }),

        new HtmlWebpackPlugin({
            template: 'src/index.html'
        }),

        new webpack.ProvidePlugin({
            jQuery: 'jquery',
            $: 'jquery',
            jquery: 'jquery'
        })
    ],
};

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

1reaction
alex-shamshurincommented, Nov 17, 2016

+1

0reactions
granmoecommented, Nov 17, 2016

I have the same issue. Is there any workaround?

Read more comments on GitHub >

github_iconTop Results From Across the Web

possible EventEmitter memory leak detected - node.js
After searching for github issues, documentation and creating similar event emitter memory leaks, this issue was observed due to node-apn module used for...
Read more >
How to fix possible EventEmitter memory leak detected - cri.dev
The warning possible EventEmitter memory leak detected happens when you have more than 10 listeners (read EventEmitter) attached to an event ...
Read more >
Possible EventEmitter memory leak detected. · Issue #1295
Hi there, I think there is a regression in version 3.0. When I'm using Custom Agent (https) with keepAlive: true option and then...
Read more >
Node.js Lesson 9: Events, EventEmitter and Memory Leaks
Memory Leaks. EventListener has a limit of adding 10 listeners per event by default. When more than 10 listeners are added, it will...
Read more >
Understanding memory leaks in node.js part 2 - alxolr
We start by profiling our app using node clinic and autocanon . We can see the RSS (Resident Set Size) which stands for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found