z0mt3c / hapi-swaggered-ui

An easy swagger-ui drop-in plugin for hapi (to be used with hapi-swaggered).
39 stars 31 forks source link

Hapi 9.0 removes inert and vision plugins #21

Closed craigbeck closed 9 years ago

craigbeck commented 9 years ago

Using hapi-swaggered-ui with hapi v9.0.3 results with an error on startup:

Error: Plugin hapi-swaggered-ui missing dependency vision in connection: http://0.0.0.0:8081

solution: install vision and inert as top level dependencies (they are already included as dependencies of hapi-swaggered-ui) and register them with your server.

install:

$ npm install --save vision inert

register:

var Inert = require("inert");
var Vision = require("vision");

server.register([
  Inert,
  Vision,
  /* register other plugins including hapi-swaggered and hapi-swaggered-ui */
], funciton (err) { /* other stuff */ })
z0mt3c commented 9 years ago

Correct - as listed in the example in README.md file. Whats the point of this issue? Should we may put an additional note somewhere? What do you think?

craigbeck commented 9 years ago

Sorry @z0mt3c I'm not seeing where this is called out in the README.md. I opened the issue as a way to document and provide the solution for anyone who might run into this. The "fix" i suppose would be to update the documentation to call out this step. I was just caught out by this doing a refactoring of a working service splitting it into another independent service where I installed the latest version of Hapi and ran into this.

craigbeck commented 9 years ago

PR #22 opened

craigbeck commented 9 years ago

:+1: thanks @z0mt3c