rwieruch / minimal-react-webpack-babel-setup

The minimal React, Webpack, Babel Setup. You want to get beyond create-react-app?

Home Page:https://www.robinwieruch.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work

ilenejohnson opened this issue · comments

I did a clone and did "npm run start" and got this:
npm run start

minimal-react-webpack-babel-setup@1.0.0 start C:\minimal-react-webpack-babel-setup
webpack-dev-server --config ./webpack.config.js --mode development

The CLI moved into a separate package: webpack-cli
Please install 'webpack-cli' in addition to webpack itself to use the CLI
-> When using npm: npm i -D webpack-cli
-> When using yarn: yarn add -D webpack-cli
module.js:549
throw err;
^

Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Ilene\AppData\Roaming\npm\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! minimal-react-webpack-babel-setup@1.0.0 start: webpack-dev-server --config ./webpack.config.js --mode development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the minimal-react-webpack-babel-setup@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

I don't understand. The webpack-cli is listed as dependency in the package.json.

Tested it myself and it worked.

I just followed along with your blog post on this article. Worked fine for me.

Thanks for the confirmation @Dikvega :) Helps a lot!