nodejsinaction icon indicating copy to clipboard operation
nodejsinaction copied to clipboard

The Node.js in Action (Manning) code repository

Results 8 nodejsinaction issues
Sort by recently updated
recently updated
newest added

I'm referring to this part of the code: ``` files.forEach((file) => { const task = ((file) => { return () => { fs.readFile(file, (err, text) => { if (err) throw...

Greetings, This PR address the usage of bind in render and with listeners. bind returns a new function every time its called, so using it in render would cause performance...

Why you make the so newbie error...

To prevent `Module not found: Error: Cannot resolve module '-inline' in d:\OSPanel\domains\nodejsinaction\ch04-front-end\webpack-hotload-example`.

I got the error when I hit http://localhost:3000 after running the example code. But the error goes away, if I change _**routes/index.js**_ like below with specifying 'index' to 'index.jade'. However...

- was still pointing to 1st Edition

Fixes #1. According to https://nodejs.org/api/all.html#events_passing_arguments_and_this_to_listeners, `this` keyword no longer references the `EventEmitter` instance. Now `channel` is used directly.

~/njs_in_action/ch02-intro-to-node/listing_211/index.js:9 this.clients[id] = client; ^ TypeError: Cannot set property '::ffff:127.0.0.1:55139' of undefined at EventEmitter.channel.on (~/njs_in_action/ch02-intro-to-node/listing_211/index.js:9:20) at emitTwo (events.js:106:13) at EventEmitter.emit (events.js:191:7) at Server.net.createServer.client (~/njs_in_action/ch02-intro-to-node/listing_211/index.js:20:11) at emitOne (events.js:96:13) at Server.emit (events.js:188:7)...