webpack报错

Posted by 畅通 on January 14, 2019

本期内容:webpack报错

最近在学习vue的相关内容,看的是2017的视频,难免组件发生更新,特开此贴。

报错1:

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

##解决思路:提示下载webkpack-cli,npm i webpack-cli --save-dev

报错2:

babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.

##解决思路:看了babel-loader的版本和视频版本不一致,报错也是这样的问题,降级解决了