Error: Cannot find module 'webpack/bin/config-yargs'
程序员文章站
2022-06-01 12:22:08
...
记录一下
原因是 webpack与webpack-dev-server版本不兼容导致
*[email protected]
[email protected]
*
2. [email protected]
[email protected]
3. webpack": “^3.8.0”,
“webpack-dev-server”: “^2.9.7”,(我现在用的版本,已测试,可用)
1种方法
npm uninstall webpack-dev-server -g 卸载全局
npm uninstall webpack-dev-server -D 卸载局部(本地)
npm i [email protected] -D 本地安装
2种方法
cnpm uninstall --save-dev webpack-dev-server
cnpm install --save-dev [email protected]
推荐阅读
-
webpack-dev-server config.js Cannot find module
-
Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module
-
【已解决】运行webpack-dev-server时提示Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
webpack5: Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
Webpack 报错:Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
webpack-dev-server 报错 Error: Cannot find module ‘webpack/bin/config-yargs‘
-
webpack——Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
【webpack-dev-server】Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
-
Error: Cannot find module 'webpack-cli/bin/config-yargs' at Function.Module._resolveFilename
-
【webpack】Error: Cannot find module webpack-cli/bin/config-yargs