webpack 打包报错:One CLI for webpack must be installed. These are recommended choices, delivered as sepa
Posted 简一118
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了webpack 打包报错:One CLI for webpack must be installed. These are recommended choices, delivered as sepa相关的知识,希望对你有一定的参考价值。
webpack 打包报错:
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
解决办法:
全局、局部安装个遍!具体什么原因还不清楚...
先全局安装webpack和webpack-cli
npm install webpack -g
npm install webpack-cli -g
再局部安装webpack和webpack-cli
npm install webpack --save-dev
npm install webpack-cli --save-dev
以上是关于webpack 打包报错:One CLI for webpack must be installed. These are recommended choices, delivered as sepa的主要内容,如果未能解决你的问题,请参考以下文章
使用webpack命令打包时,报错TypeError: Cannot read property 'presetToOptions' of undefined的解决办法
解决报错:Cannot find module 'webpack-cli/bin/config-yargs'
vue-cli开启gzip打包报错TypeError: Cannot read property ‘tapPromise‘ of undefined-解决