- 执行npm run dev报错,需执行的命令主要有:
npm install webpack-dev-server -g
#安装依赖dependencies
yarn install
#或者
npm i
- 报错与解决
- a. 提示报如下错误
Error: Cannot find module 'webpack-cli/bin/config-yargs'
Webpack - webpack-dev-server: command not found
- b. 如下方法未尝试
我已经下载了webpack-cli了,但是依然报错。
How to solve 'Cannot find module 'webpack-cli/bin/config-yargs' error in reactjs?
npm i -D webpack-cli
网友评论