webpack4学习之问题一

出现的问题:
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:491
throw err;
^

我们提供的服务有:网站制作、成都网站制作、微信公众号开发、网站优化、网站认证、平川ssl等。为上千余家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的平川网站制作公司

Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (E:\webpack_vue\node_modules\webpack-dev-server\bin\webpack-dev-server.js:87:1)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)

原因:
需要安装webpack-cli

解决方案:
$ npm install webpack-cli --save-dev


网页题目:webpack4学习之问题一
转载源于:http://scyanting.com/article/ggcdde.html