npm run dev 를 실행했더니... Cannot find module 'webpack-cli/bin/config-yargs' 오류메시지가 나옵니다.
simjaeun-ui-MacBook-Air:todolistapp01 simjaeun$ npm run dev
> todolistapp@1.0.0 dev /Users/simjaeun/Desktop/vue/vuejs_book/ch11/todolistapp01
> cross-env NODE_ENV=development webpack-dev-server --open --hot
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
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/simjaeun/Desktop/vue/vuejs_book/ch11/todolistapp01/node_modules/webpack-dev-server/bin/webpack-dev-server.js:84:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todolistapp@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todolistapp@1.0.0 dev 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:
npm ERR! /Users/simjaeun/.npm/_logs/2018-12-02T15_36_30_979Z-debug.log
simjaeun-ui-MacBook-Air:todolistapp01 simjaeun$ npm install
npm WARN ajv-errors@1.0.0 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.4.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.1.10 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
audited 9049 packages in 10.914s
found 0 vulnerabilities
webpack 과 webpack-dev-server 버전이 서로간 충돌로 인해서 아래와 같이 버전을 맞춰 주면 됩니다.