I use webpack , gulp , coffee-loader with Happypack . Error appears when changing .coffee or .js file: Error: task completion callback called too many times at finish
Part of the webpack.conf.js file:
resolve: { modulesDirectories: ['node_modules'], extensions: ['.js', '.coffee', ''] }, module: { preLoaders: [{ test: /\.js$/, loader: 'source-map-loader' }], loaders: [{ test: /\.js$/, loader: 'happypack/loader', exclude: /node_modules/ }, { test: /\.coffee$/, loader: 'happypack/loader?id=coffeescripts', exclude: /node_modules/ }].filter(loader => loader) }, plugins: [ new HappyPack({ loaders: ['babel'], threads: 4, verbose: false, cache: true }), new HappyPack({ id: 'coffeescripts', threads: 4, loaders: ['coffee-loader'] }), In app.js do import '../scripts/script1.coffee' ;
After running the script (from npm ) to watch everything is fine. But with any change in the .coffee file, the following error appears:
[16:51:56] 'scripts: watch' errored after 6.58 min [16:51:56] Error: task completion callback called too many times at finish (C: \ Users \ X \ Documents \ Prj \ node_modules \ orchestrator \ lib \ runTask.js: 15: 10) at cb (C: \ Users \ X \ Documents \ Prj \ node_modules \ orchestrator \ lib \ runTask.js: 29: 3) at Watching.handler (C: \ Users \ X \ Documents \ Prj \ tasks \ scripts.js: 53: 4) at Watching._done (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 81: 7) at Watching. (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 61: 18) at Compiler.emitRecords (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler. js: 282: 37) at Watching. (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 58: 19) at C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 275: 11 at Compiler.applyPluginsAsync (C: \ Users \ X \ Documents \ Prj \ node_modules \ tapable \ lib \ Tapable.js: 60: 69) at Compiler.afterEmit (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 272: 8) at Compiler. (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ lib \ Compiler.js: 267: 14) at C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ node_modules \ async \ lib \ async. js: 52: 16 at done (C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ node_modules \ async \ lib \ async.js: 246: 17) at C: \ Users \ X \ Documents \ Prj \ node_modules \ webpack \ node_modules \ async \ lib \ async.js: 44: 16 at C: \ Users \ X \ Documents \ Prj \ node_modules \ graceful-fs \ graceful-fs.js: 43: 10 at FSReqWrap.oncomplete (fs. js: 123: 15)
What is the problem, how to fix the error?