Open KeKs0r opened 9 years ago
Got the same issue:
$ yo hapi-composer
_-----_
| | .--------------------------.
|--(o)--| | Hello, and welcome to |
`---------´ | the hapi composer |
( _´U`_ ) | generator. Let's be |
/___A___\ | awesome together! |
| ~ | '--------------------------'
__'.___.'__
´ ` |° ´ Y `
? Project Name: hapi-playground
? Description: The best project ever.
? Homepage:
? License: MIT
? GitHub username:
? Author's Name:
? Author's Email:
? Author's Homepage:
? Which modules would you like to include? jscs (JavaScript Code Style checker), release (Bump npm versions with Gulp)
? Which hapi plugins would you like to include? lout (API documentation generator), hapi-auth-basic (Basic authentication plugin), tv (Interactive debug console), poop (Plugin for handling uncaught exceptions), good (Server and process monitoring plugin)
? Would you like to include a hapi plugin boilerplate? No
? Which other npm dependencies would you like to include? joi (Object schema validation), boom (HTTP-friendly error objects)
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
create .jshintrc
create .gitignore
create .travis.yml
create .editorconfig
create .jscs.json
create README.md
create gulpfile.js
create package.json
create lib/index.js
create lib/config.json
create test/hapi-playground_test.js
npm WARN package.json hapi-playground@0.0.0 Bug string field must be url, email, or {email,url}
npm WARN package.json hapi-playground@0.0.0 Normalized value of bugs field is an empty object. Deleted.
npm WARN package.json hapi-playground@0.0.0 homepage field must start with a protocol.
> v8flags@1.0.8 install /Users/pk/Documents/dev/hapi-playground/hapi-playground/node_modules/gulp/node_modules/v8flags
> node fetch.js
> heapdump@0.3.3 install /Users/pk/Documents/dev/hapi-playground/hapi-playground/node_modules/poop/node_modules/heapdump
> node-gyp rebuild
CXX(target) Release/obj.target/addon/src/heapdump.o
SOLINK_MODULE(target) Release/addon.node
SOLINK_MODULE(target) Release/addon.node: Finished
> ws@0.4.32 install /Users/pk/Documents/dev/hapi-playground/hapi-playground/node_modules/tv/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! peerinvalid The package hapi does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer good@5.1.0 wants hapi@>= 8.x.x
npm ERR! peerinvalid Peer poop@1.2.5 wants hapi@>=2.x.x
npm ERR! peerinvalid Peer tv@4.0.0 wants hapi@>=8.x.x
npm ERR! peerinvalid Peer hapi-auth-basic@2.0.0 wants hapi@>=8.x.x
npm ERR! peerinvalid Peer lout@6.0.1 wants hapi@>= 8
npm ERR! System Darwin 13.4.0
npm ERR! command "/Users/pk/.nvm/v0.10.32/bin/node" "/Users/pk/.nvm/v0.10.32/bin/npm" "install"
npm ERR! cwd /Users/pk/Documents/dev/hapi-playground/hapi-playground
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/pk/Documents/dev/hapi-playground/hapi-playground/npm-debug.log
npm ERR! not ok code 0
Same, here's stack:
npm ERR! Darwin 13.4.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "lout" npm ERR! node v0.10.33 npm ERR! npm v2.1.11 npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package hapi does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer lout@6.1.0 wants hapi@>= 8
Same:
npm ERR! Darwin 14.1.0 npm ERR! argv "node" "/usr/local/bin/npm" "i" "buffer64" "--save" npm ERR! node v0.10.33 npm ERR! npm v2.6.0 npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package hapi does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer hapi-auth-basic@2.0.0-rc1 wants hapi@>=8.x.x npm ERR! peerinvalid Peer hapi-auth-cookie@2.0.0-rc1 wants hapi@>=8.x.x
bump hapi version to 8.x.x (package.json). npm install
and replace default index.js with:
var config = require('./config.json');
var Glue = require('glue');
var manifest = {
connections: [{
host: config.host,
port: config.port
}],
plugins: config.plugins
};
if (!module.parent) {
Glue.compose(manifest, function (err, pack) {
if (err) {
console.log('Failed composing');
} else {
pack.start(function() {
console.log("Servers is listening on port " + config.port);
});
}
});
}
module.exports = manifest;
Submitted pull-request https://github.com/wakayama-io/generator-hapi-composer/pull/5
All of you that mentioned this bug really should take a couple minutes to look at how pull-requests work on GitHub. It's incredibly easy to contribute to a project and be part of a solution rather than just another "me too" in an issues conversation.
All I had to do for this pull request was: -search this project for "hapi" to see where the reference to "6." was, -fork this project so I had a copy I could modify -edit the fix (right on GitHub even) -save the file, commit directly to my forked master branch (not sure this is best practice) -Goto "Pull Reqests" for my project and hit new. In the pull request I mentioned the link to this issue (hence the "rainabba referenced" posts above). -come back here and link to the pull request just to make things that much easier
BAM! I've officially "contributed" even though I feel like a newb still. Of course, it's taken me a couple years with GitHub to realize how easy this can be :)
UPDATE: Project isn't ready for Hapi 8 yet so I've closed my pull-request and will submit again once I've updated other code.
Hi i just tried using the generator and came across some this issue:
I am unfortunately not yet a node / npm specialist in order to figure this out easily myself.