Skip to content

Unable to create http server using node v24 (currently RC) #1984

Open
@abhilash-sivan

Description

@abhilash-sivan
  • Used appropriate template for the issue type
  • Searched both open and closed issues for duplicates of this issue
  • Title adequately and concisely reflects the feature or the bug

Restify Version: 11.1.0 (latest)
Node.js Version: 24 (latest)

Expected behaviour

A simple HTTP server implementation is expected to function correctly in the most recent Node.js release.

Actual behaviour

The server fails to start due to a breaking change introduced in Node.js version 24.

In this release, the http_parser process binding—deprecated for the past four years—has been removed. This binding is a transitive dependency of the restify package, which results in compatibility issues.

restify -> spdy -> http-deceiver

Repro case

A simple application running on Node.js v24 should suffice. A sample code snippet is provided below:

const restify = require('restify');

const port = 3000;
const logPrefix = `Restify App:\t`;

const server = restify.createServer({
  name: 'myrestifyapp',
  version: '1.0.0',
});

server.get('/', (req, res, next) => {
  res.send('success');
  next();
});

server.get('/test', function (req, res, next) {
  log('Received /test request');
});

server.listen(port, function () {
  log('%s listening at %s', server.name, server.url);
});

function log() {
  const args = Array.prototype.slice.call(arguments);
  args[0] = logPrefix + args[0];
  console.log.apply(console, args);
}

Cause

See the change in node js library that caused this issue: nodejs/node#57149

Are you willing and able to fix this?

I don’t think I can make this change directly. The core functionality that uses process.binding is part of the http-deceiver package, which is a dependency of spdy.

Unless we can modify that behavior within http-deceiver/spdy or replace the entire dependency, there may not be much we can do.

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