glook / webpack-typescript-react

Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
MIT License
217 stars 54 forks source link

Got this issue when run this directly after install #13

Closed Altimetrik-venkateshp closed 2 years ago

Altimetrik-venkateshp commented 2 years ago

C:\projects\webpack5-react-typescript>yarn start yarn run v1.22.15 $ cross-env WEBPACK_IS_DEV_SERVER=true NODE_ENV=development webpack serve --config webpack.config.babel.js [webpack-cli] Unable to load '@webpack-cli/serve' command [webpack-cli] TypeError: options.forEach is not a function at WebpackCLI.makeCommand (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\lib\webpack-cli.js:108:21) at ServeCommand.apply (C:\projects\webpack5-react-typescript\node_modules\@webpack-cli\serve\lib\index.js:41:19) at loadCommandByName (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\lib\webpack-cli.js:626:35) at Command. (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\lib\webpack-cli.js:1091:23) at Command.listener [as _actionHandler] (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\node_modules\commander\index.js:922:31) at Command._parseCommand (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\node_modules\commander\index.js:1503:14) at Command.parse (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\node_modules\commander\index.js:1292:10) at Command.parseAsync (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\node_modules\commander\index.js:1318:10) at WebpackCLI.run (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\lib\webpack-cli.js:1123:28) at runCLI (C:\projects\webpack5-react-typescript\node_modules\webpack-cli\lib\bootstrap.js:11:19) error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lub0v-parsable commented 2 years ago

For me issue was fixed after I removed @webpack-cli from package.json, ran yarn to update dependencies and then ran yarn start - it asked me to install cli again and successfully served site after that.