Comments (11)
Same issue here, also on 0.1.3.
Different error though.
$ yo server-configs
[?] config 1
error: Invalid input
error: Which server config do you want?
[?] config apache
error: Invalid input
error: Which server config do you want?
[?] config Apache
error: Invalid input
error: Which server config do you want?
[?] config
on exit:
info ... Fetching https://github.com/h5bp/server-configs/archive/master.tar.gz ...
info This might take a few moments
...............................
✔ Done in 2.175s.
✔ Done in /usr/local/share/npm/lib/node_modules/generator-server-configs/app/templates
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at directory (/usr/local/share/npm/lib/node_modules/yo/node_modules/yeoman-generator/lib/actions/actions.js:219:19)
at null.<anonymous> (/usr/local/share/npm/lib/node_modules/generator-server-configs/app/index.js:21:9)
at Extract.<anonymous> (/usr/local/share/npm/lib/node_modules/yo/node_modules/yeoman-generator/lib/actions/fetch.js:68:7)
at Extract.EventEmitter.emit (events.js:117:20)
at DirWriter.<anonymous> (/usr/local/share/npm/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/tar/lib/extract.js:67:8)
at DirWriter.EventEmitter.emit (events.js:117:20)
at end (/usr/local/share/npm/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/tar/node_modules/fstream/lib/writer.js:323:12)
Bypassing the prompt works just fine (so the error above won't really help, as far as I was able to wrap my head around it)
$ yo server-configs apache
info ... Fetching https://github.com/h5bp/server-configs/archive/master.tar.gz ...
info This might take a few moments
.................
✔ Done in 1.917s.
✔ Done in /usr/local/share/npm/lib/node_modules/generator-server-configs/app/templates
create .htaccess
create README.md
from generator-server-configs.
I think the problem is related to my local yeoman installation, because when I run the generator using node, the prompt will work properly.
Here's my environment:
$ brew -v
Homebrew 0.9.4
$ node -v
v0.10.11
$ npm -v
1.2.30
$ yo -v
1.0.0-beta.6
from generator-server-configs.
@jozefizso Could you enlighten me on how to run the generator in node?
from generator-server-configs.
I just created simple NodeJS application and copier over the code that prompts for web server selection.
from generator-server-configs.
I lack the knowledge to do that without googling, so I will just believe you :)
I work in the same environment. I did now try node v0.8.25 as well.
The prompt has the same issue there.
No listing of possibilities, does not accept any input.
When I exit however, every possible option is put in the filesystem
$ yo server-configs
[?] config apache
error: Invalid input
error: Which server config do you want?
[?] config
info ... Fetching https://github.com/h5bp/server-configs/archive/master.tar.gz ...
info This might take a few moments
.............................
✔ Done in 2.709s.
✔ Done in /usr/local/share/npm/lib/node_modules/generator-server-configs/app/templates
create .gitattributes
create .gitignore
create .gitmodules
create .npmignore
create CONTRIBUTING.md
create README.md
create apache/.htaccess
create apache/README.md
create gae/README.md
create gae/app.yaml
create gae/gae.py
create iis/IIS6-README.md
create iis/README.md
create iis/dotnet 3/web.config
create iis/dotnet 4/mvc4 & mvc4api/web.config
create iis/dotnet 4/webforms/web.config
create lighttpd/README.md
create lighttpd/lighttpd.conf
create nginx/README.md
create nginx/conf/README.md
create nginx/conf/cache-busting.conf
create nginx/conf/cache-file-descriptors.conf
create nginx/conf/cross-domain-ajax.conf
create nginx/conf/cross-domain-fonts.conf
create nginx/conf/expires.conf
create nginx/conf/h5bp.conf
create nginx/conf/no-transform.conf
create nginx/conf/protect-system-files.conf
create nginx/conf/x-ua-compatible.conf
create nginx/mime.types
create nginx/nginx.conf
create nginx/sites-available/README.md
create nginx/sites-available/example.com
create nginx/sites-enabled/README.md
create test/.htaccess
create test/README.md
create test/css/style.css
create test/files/.htaccess
create test/files/test.bin
create test/files/test.bmp
create test/files/test.css
create test/files/test.css.gz
create test/files/test.doc
create test/files/test.gif
create test/files/test.html
create test/files/test.html.gz
create test/files/test.ico
create test/files/test.jpeg
create test/files/test.jpg
create test/files/test.js
create test/files/test.js.gz
create test/files/test.json
create test/files/test.pdf
create test/files/test.php
create test/files/test.png
create test/files/test.rtf
create test/files/test.tif
create test/files/test.tiff
create test/files/test.txt
create test/files/test.xml
create test/img/server-config-consistency.png
create test/img/test.png
create test/js/libs/jquery-1.7.1.min.js
create test/js/server-config-verify.js
create test/node-server.js
create test/tests.json
from generator-server-configs.
Looks like you're using an older version of generator-webapp. npm cache clean && npm uninstall -g generator-webapp && npm install -g generator-webapp
.
from generator-server-configs.
@sindresorhus Why generator-webapp
?
I did a global update just to be sure
$ npm update -g
I also ran your clean, uninstall, install routine for generator-webapp
(again just to be sure :) ) and for generator-server-configs
$ npm ls -g | grep -i generator
[some warnings about missing repository fields]
├─┬ [email protected]
│ └─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
├─┬ [email protected]
└─┬ [email protected]
$ yo server-configs
[?] config apache
error: Invalid input
error: Which server config do you want?
[?] config 1
error: Invalid input
error: Which server config do you want?
[?] config
info ... Fetching https://github.com/h5bp/server-configs/archive/master.tar.gz ...
info This might take a few moments
...............
✔ Done in 1.99s.
✔ Done in /Users/jeroen/.nvm/v0.10.11/lib/node_modules/generator-server-configs/app/templates
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at directory (/Users/jeroen/.nvm/v0.10.11/lib/node_modules/yo/node_modules/yeoman-generator/lib/actions/actions.js:219:19)
at null.<anonymous> (/Users/jeroen/.nvm/v0.10.11/lib/node_modules/generator-server-configs/app/index.js:21:9)
at Extract.<anonymous> (/Users/jeroen/.nvm/v0.10.11/lib/node_modules/yo/node_modules/yeoman-generator/lib/actions/fetch.js:68:7)
at Extract.EventEmitter.emit (events.js:117:20)
at DirWriter.<anonymous> (/Users/jeroen/.nvm/v0.10.11/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/tar/lib/extract.js:67:8)
at DirWriter.EventEmitter.emit (events.js:117:20)
at end (/Users/jeroen/.nvm/v0.10.11/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/tar/node_modules/fstream/lib/writer.js:323:12)
Sorry I can't be of more help..
from generator-server-configs.
Hey,
I tried h5bp generator yesterday and I could not answer the "Would you like docs included?" question. I think this is an issue in yeoman, because I have problems with answering prompts at other places too (eg. when yeoman asks me if I want to replace existing file).
$ yo h5bp
[?] Would you like docs included? (y/N) N
error: Invalid input
[?] Would you like docs included? (y/N) n
error: Invalid input
[?] Would you like docs included? (y/N)
error: Invalid input
[?] Would you like docs included? (y/N)
error: Invalid input
from generator-server-configs.
Same here (generator-h5bp
not accepting input on first prompt).
Consecutive prompts about eg overwriting existing .gitattributes do work without a problem.
from generator-server-configs.
I have updated yeoman to 1.0.0-beta7 right now and prompts are working for me.
from generator-server-configs.
Works for me too.
from generator-server-configs.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-server-configs.