You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.
The getting started tutorial http://hapijs.com/tutorials isn't working with node 0.10.33, hapi 8.0.0, and good 5.0.0.
Here's the error:
/Users/adamhickey/HapiTutorials/myproject/node_modules/good/node_modules/hoek/lib/index.js:663
throw new Error(msgs.join(' ') || 'Unknown error');
^
Error: Invalid monitorOptions options reporters is required
at Object.exports.assert (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/node_modules/hoek/lib/index.js:663:11)
at Object.exports.assert (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/schema.js:11:10)
at new module.exports.internals.Monitor (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/monitor.js:53:12)
at Object.exports.register (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/index.js:10:19)
at /Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/lib/plugin.js:235:14
at iterate (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/node_modules/items/lib/index.js:35:13)
at Object.exports.serial (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/node_modules/items/lib/index.js:38:9)
at internals.Plugin.register (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/lib/plugin.js:221:11)
at Object.<anonymous> (/Users/adamhickey/HapiTutorials/myproject/server.js:23:8)
at Module._compile (module.js:456:26)
And here's server.js:
var Hapi = require('hapi');
var Good = require('good');
var server = new Hapi.Server();
server.connection({ port: 3000 });
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
reply('Hello, world!');
}
});
server.route({
method: 'GET',
path: '/{name}',
handler: function (request, reply) {
reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
}
});
server.register(Good, function (err) {
if (err) {
throw err; // something bad happened loading the plugin
}
server.start(function () {
server.log('info', 'Server running at: ' + server.info.uri);
});
});
The text was updated successfully, but these errors were encountered:
Hello!
The getting started tutorial http://hapijs.com/tutorials isn't working with node 0.10.33, hapi 8.0.0, and good 5.0.0.
Here's the error:
And here's server.js:
The text was updated successfully, but these errors were encountered: