hapijs / catbox-memory

Memory adapter for catbox
Other
33 stars 30 forks source link

hapi server exits immediately if using catbox-memory cache. #51

Closed steevhise closed 6 years ago

steevhise commented 6 years ago

catbox-memory now seems to make hapi crash completely silently. versions: node 8.7.0, hapi 16.6.2, catbox 9.0.0, catbox-memory 3.0.0

below is a very basic server which exits immediately with Process finished with exit code 0

const Hapi = require('hapi');
const Hoek = require('hoek');
const Mem = require('catbox-memory');

// basic server
const server = new Hapi.Server({
    cache: {
        engine: Mem,
        name: 'test',
        partition: 'test-partition'
    }
});

server.connection({ port: 7000 });

server.start((err) => {

    Hoek.assert(!err, err);
    console.log('Server started at: ' + server.info.uri);
});

commenting out the

    cache: {
        engine: Mem,
        name: 'test',
        partition: 'test-partition'
    }

results in the server starting fine as usual.

steevhise commented 6 years ago

fwiw, I cloned the current repo and ran the tests and they all pass just fine.

kanongil commented 6 years ago

That version combination doesn't make any sense.

hueniverse commented 6 years ago

You need to pay attention to the new set of hapi v17 modules. Use the previous major version of this module.

steevhise commented 6 years ago

so you're saying 3.0.0 isn't compatible with hapi 16?

steevhise commented 6 years ago

also, it would be nice if there was some explanation when it exits.

devinivy commented 6 years ago

@steevhise yeah, that's right. I wonder if this could be better expressed using a peer dependency on the relevant version of catbox.

dhinklexo commented 6 years ago

Did 3.0 get published accidentally? The releases page show's 2.x.x being the current release, when npm is installing 3.0.0 by default.

hueniverse commented 6 years ago

We don't really uses releases consistently so it's never a good indication across hapijs modules. No accidents.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.