You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run webpack-cli init ../webpack-scaffold-react1, it seems to throw an error from Yeoman:
events.js:292 throw er; // Unhandled 'error' event ^TypeError: self.prompt is not a function at List (/Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/@webpack-cli/webpack-scaffold/index.js:51:17) at WebpackGenerator.prompting (/Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/index.js:18:13) at Object.<anonymous> (/Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/yeoman-generator/lib/index.js:816:25) at /Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/run-async/index.js:49:25 at new Promise (<anonymous>) at /Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/run-async/index.js:26:19 at runLoop.add.once.once (/Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/yeoman-generator/lib/index.js:817:11) at processImmediate (internal/timers.js:456:21)Emitted 'error' event on WebpackGenerator instance at: at Immediate.<anonymous> (/Users/hyaocuk/Documents/CS/Frontend/Scaffold/webpack-scaffold-react1/node_modules/yeoman-generator/lib/index.js:852:20) at processImmediate (internal/timers.js:456:21)
the generator index.js
module.exports=classWebpackGeneratorextendsGenerator{/* constructor */prompting(){returnthis.prompt([List('confirm','Welcome to the demo scaffold! Are you ready?',['Yes','No','Pengwings']),Input('entry','What is the entry point in your app?')]).then(answer=>{if(answer['confirm']==='Pengwings'){this.options.env.configuration.dev.webpackOptions=createDevConfig(answer);}})}}
I tried the latest @webpack-cli/init and @webpack-cli/init@0.2.2, but encountered the same error eventually.
Thank you~
I use nvm
Node: V14.0.0
npm: 6.14.4
yo: 3.1.1
The text was updated successfully, but these errors were encountered:
I'm currently learning how to build my own generator for webpack-cli following the instructions: https://webpack.js.org/contribute/writing-a-scaffold/
I tried to run
webpack-cli init ../webpack-scaffold-react1
, it seems to throw an error from Yeoman:the generator index.js
I tried the latest @webpack-cli/init and @webpack-cli/init@0.2.2, but encountered the same error eventually.
Thank you~
I use nvm
Node: V14.0.0
npm: 6.14.4
yo: 3.1.1
The text was updated successfully, but these errors were encountered: