Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running app generator does not create project scaffold #271

Closed
loosenRogers opened this issue Aug 11, 2016 · 11 comments
Closed

Running app generator does not create project scaffold #271

loosenRogers opened this issue Aug 11, 2016 · 11 comments
Assignees
Labels

Comments

@loosenRogers
Copy link

when iI follow the introduction to generate my project, here comes the error.
my command:"yo react-webpack galleyReact",i want to use react-webpack to generate a project named "galleryReact",then
? Please choose your application name (galleryReact)

events.js:141
throw er; // Unhandled 'error' event
^

TypeError: this.env.adapter.prompt(...).then is not a function
at Base.prompt (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\node_modules\yeoman-generator\lib\base.js:240:45)
at module.exports.generator.Base.extend.prompting (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\generators\app\index.js:40:10)
at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\node_modules\yeoman-generator\lib\base.js:439:23)
at C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\node_modules\yeoman-generator\node_modules\run-async\index.js:26:25
at C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\node_modules\yeoman-generator\node_modules\run-async\index.js:25:19
at C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-react-webpack\node_modules\yeoman-generator\lib\base.js:440:9
at processImmediate as _immediateCallback

i have no idea of solving this problem,hoping you can give some help,thanks!

@sthzg
Copy link
Member

sthzg commented Aug 11, 2016

@loosenRogers can you post which version of the yo cli you are using? yo --version on the command line should output the version number (do the steps in this SO question solve the issue?)

@loosenRogers
Copy link
Author

the version of the yo cli is 1.5.1

@loosenRogers
Copy link
Author

i update my yo version to 1.8.4 ,then i try generate the project again.
This is the result:
Out of the box I include Webpack and some default React components.

? Please choose your application name (galleryReact) galleryReact
? Please choose your application name galleryReact
? Which style language do you want to use? (Use arrow keys)
? Which style language do you want to use? sass
? Enable postcss? (y/N) y
? Enable postcss? Yes
But i found there was no project generated.

@marcuspeterson
Copy link

I was having this exact same error, but it appears installing directly from using npm seemed to resolve the issue for me.
npm uninstall -g generator-react-webpack
npm install -g https://github.com/react-webpack-generators/generator-react-webpack.git

@sthzg sthzg added the bug label Aug 12, 2016
@sthzg
Copy link
Member

sthzg commented Aug 12, 2016

@loosenRogers @FamiliarPie hi guys, thanks for reporting. I can reproduce the problem on my local machine. There have been quite a few changes in the past days, both in terms of code and infrastructure (e.g. moving the repository url of this generator), so maybe some wires got crossed along the way. Sorry that you ran into these problems, we'll look into it right away.

@sthzg sthzg changed the title ? Please choose your application name (galleryReact) when generate the project Running app generator does not create project scaffold Aug 12, 2016
@sthzg sthzg self-assigned this Aug 12, 2016
@sthzg
Copy link
Member

sthzg commented Aug 12, 2016

Okay, the reason is due to the updated dependency to yeoman-generator 0.24, which moved over to a newer version of inquirer.js that started moving to promises (and thus deprecates removed the var done = this.async() api). Fix is coming in the next minutes.

sthzg added a commit that referenced this issue Aug 12, 2016
sthzg added a commit that referenced this issue Aug 12, 2016
Updated prompting to new yeoman-generator api

Fixes #271
@sthzg
Copy link
Member

sthzg commented Aug 12, 2016

Thanks again for reporting, this fix will be available through npm with the next releasee of the generator. I am leaving this ticket open as a reminder until the package is published.

@weblogixx
Copy link
Member

Sorry, this was my fault :(. It seems I did not run tests before publishing the actual v3 stable.
@sthzg: Sorry you had to step in, great work as always! Thank you! You may publish any time, npm permissions are set up accordingly.

@sthzg
Copy link
Member

sthzg commented Aug 12, 2016

@weblogixx no worries, I fixed exactly the same issue a short while ago on another gist, so I already had an idea about where it is coming from.

New patch release v3.3.4 is published on npm.

@sthzg sthzg closed this as completed Aug 12, 2016
@acwonders
Copy link

I had the exactly same issue yesterday on v3.3.3. Just tried with v3.3.4 and the issue is gone. Thanks!

@sthzg
Copy link
Member

sthzg commented Aug 12, 2016

@acwonders 🙇 thanks for testing the update and taking your time to confirm the fix. much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants