Skip to content

ERR_AVVIO_PLUGIN_TIMEOUT using Add a complete application example #3

@Etto91

Description

@Etto91

🐛 Bug Report

I'm trying to add parse-server to a fastify server and i got this error ERR_AVVIO_PLUGIN_TIMEOUT.
I have tried to copy and paste the example in the readme and i got the same error.

To Reproduce

Steps to reproduce the behavior:

const fastify = require('fastify')();
const router = require('express').Router();
router.use(function (req, res, next) {
  res.setHeader('x-custom', true);
  next();
});

router.get('/hello', (req, res) => {
  res.status(201);
  res.json({ hello: 'world' });
});

router.get('/foo', (req, res) => {
  res.status(400);
  res.json({ foo: 'bar' });
});

fastify
  .register(require('fastify-express'))
  .after(() => fastify.use(router));

fastify.listen(3000, console.log);

ERROR

Error: ERR_AVVIO_PLUGIN_TIMEOUT: plugin did not start in time: bound _after
    at Timeout._onTimeout (/*/node_modules/avvio/plugin.js:120:19)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7) {
  code: 'ERR_AVVIO_PLUGIN_TIMEOUT',
  fn: [Function: bound _after]
}

Your Environment

  • node version: 13.8.0
  • fastify version: 3.0.0
  • os: Mac
  • fastify-express version: 0.1.0

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