在按装yo react-webpack gallery-by-react时提示错误this.env.adapter.prompt(...).then is not a function

? Please choose your application name (galleryByReact)

events.js:141

      throw er; // Unhandled 'error' event

      ^

TypeError: this.env.adapter.prompt(...).then is not a function

    at Base.prompt (/usr/local/lib/node_modules/generator-react-webpack/node_modules/yeoman-generator/lib/base.js:240:45)

    at module.exports.generator.Base.extend.prompting (/usr/local/lib/node_modules/generator-react-webpack/generators/app/index.js:39:17)

    at Object.<anonymous> (/usr/local/lib/node_modules/generator-react-webpack/node_modules/yeoman-generator/lib/base.js:439:23)

    at /usr/local/lib/node_modules/generator-react-webpack/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25

    at /usr/local/lib/node_modules/generator-react-webpack/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19

    at /usr/local/lib/node_modules/generator-react-webpack/node_modules/yeoman-generator/lib/base.js:440:9

    at processImmediate [as _immediateCallback] (timers.js:383:17)

lisa02_08
浏览 1549回答 3
3回答

lisa02_08

已解决,方法是:安装generator-react-webapck$  npm install -g generator-react-webpack

lisa02_08

怎么没有牛人回答呀,老师回答一下吧,没办法继续下去了呢
打开App,查看更多内容
随时随地看视频慕课网APP