Skip to content

Conflict with Node new version: stream_base_commons.js:62 var err = req.handle.writev(req, chunks, allBuffers); #343

Description

@bbagherian

I installed Nodejs on a new system with all dependencies just yesterday, so all packages are almost updated. However I get the error below with this simple code:

Node version: v10.11.0
OS: Debian 9.4 (x86-64)

Code:

'use strict';

const express = require('express');
var spdy = require('spdy'),
fs = require('fs');


const hostname = '0.0.0.0';
const port = 3030;

var options = {
  key: fs.readFileSync(__dirname + '/test.key'),
  cert: fs.readFileSync(__dirname + '/test.cert'),

  spdy: {
    protocols: [ 'h2', 'spdy/3.1', 'http/1.1' ],
    plain: false,
    'x-forwarded-for': true,
 
    connection: {
      windowSize: 1024 * 1024, 
      autoSpdy31: false
    }
  }
};
 
var server = spdy.createServer(options, function(req, res) {
  res.writeHead(200);
  res.write('a');
  res.end('hello world!');
});


server.listen(port, hostname, () => {
  console.log('Server running');
});

Error:

internal/stream_base_commons.js:62
  var err = req.handle.writev(req, chunks, allBuffers);
                       ^

TypeError: req.handle.writev is not a function
    at writevGeneric (internal/stream_base_commons.js:62:24)
    at Socket._writeGeneric (net.js:711:5)
    at Socket._writev (net.js:720:8)
    at doWrite (_stream_writable.js:408:12)
    at clearBuffer (_stream_writable.js:517:5)
    at Socket.Writable.uncork (_stream_writable.js:314:7)
    at Socket.Writable.end (_stream_writable.js:584:10)
    at Socket.end (net.js:544:31)
    at ServerResponse.end (/........./Node/node_modules/spdy/lib/spdy/response.js:77:15)
    at Server.<anonymous> (/................../Node/test.js:64:7)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions