Dica-Developer / generator-node-webkit

Yeoman generator for nwjs applications
MIT License
282 stars 40 forks source link

I can not generate the project node-webkit .... #43

Closed johna1203 closed 10 years ago

johna1203 commented 10 years ago
$ node -v
v0.10.29

$ npm -v
1.5.0-alpha-4

$ yo -v
1.2.0

$ sudo npm install -g generator-node-webkit

generator-node-webkit@0.9.2 /usr/local/lib/lib/node_modules/generator-node-webkit
├── when@3.3.1
├── github@0.2.1
├── fs-extra@0.10.0 (jsonfile@1.2.0, rimraf@2.2.8, ncp@0.5.1, mkdirp@0.5.0)
├── tar-fs@0.4.1 (mkdirp@0.3.5, pump@0.3.4, tar-stream@0.4.4)
├── decompress-zip@0.0.8 (graceful-fs@3.0.2, mkpath@0.1.0, q@1.0.1, nopt@2.2.1, touch@0.0.2, readable-stream@1.1.13-1, binary@0.3.0)
├── request@2.37.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, qs@0.6.6, oauth-sign@0.3.0, tunnel-agent@0.4.0, node-uuid@1.4.1, mime-types@1.0.1, tough-cookie@0.12.1, form-data@0.1.4, hawk@1.1.1, http-signature@0.10.0)
├── mocha@1.20.1 (diff@1.0.7, growl@1.7.0, commander@2.0.0, mkdirp@0.3.5, jade@0.26.3, debug@1.0.4, glob@3.2.3)
└── yeoman-generator@0.17.1 (dargs@0.1.0, github-username@0.1.1, diff@1.0.8, class-extend@0.1.1, rimraf@2.2.8, text-table@0.2.0, mime@1.2.11, async@0.9.0, isbinaryfile@2.0.1, nopt@3.0.1, debug@1.0.4, mkdirp@0.5.0, shelljs@0.3.0, chalk@0.4.0, grouped-queue@0.3.0, underscore.string@2.3.3, iconv-lite@0.2.11, glob@4.0.4, findup-sync@0.1.3, file-utils@0.2.0, lodash@2.4.1, download@0.1.18, cheerio@0.17.0, gruntfile-editor@0.1.1, inquirer@0.5.1)

$ yo node-webkit   
Error node-webkit 

You don't seem to have a generator with the name node-webkit installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 28 registered generators run yo with the `--help` option.

What did might be happening? Can anyone help me solve? :(

Thank you.

mschaaf commented 10 years ago

@johna1203 What is the output of yo --help

stuartkent14-zz commented 10 years ago

I'm experiencing the same issue, and my yo --help only outputs Jquery-boilerplate, Mocha and webapp.

mschaaf commented 10 years ago

So it seems that generator-node-webkit is not installed. @stuartnkent What is the output of sudo npm install -g generator-node-webkit?

johna1203 commented 10 years ago

I solved. I tried to install other generator has the same problem. it seems that my npm setup prefix was wrong. "generator-node-webkit" was installed in the wrong folder (/home/user/npm) and when executing "yo node-webkit" I guess it was reading the folder "/usr/local/lib" I think this was the problem. i have re-configured the npm and it worked.

Thank you for helping.

stuartkent14-zz commented 10 years ago

Hi mschaaf, I'm running node on windows, which may be something to do with the issue.

It does appear to be a similar issue to Johna, and the issue does appear to lie with my Yeoman/npm setup. Sorry!

johna1203 commented 10 years ago

Hi @stuartnkent

check your config.

$ npm config get prefix 

and try to set the same value in the global config.

$ npm config set prefix '/usr/local/lib' 
$ npm config set prefix '/usr/local/lib' --global 

I do not know if this can be the solution.

mschaaf commented 10 years ago

Nice to hear that your problems are solved. Happy developing.