-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module 'webpack-cli/bin/config-yargs' #2759
Comments
Yes - webpack-dev-server does not work with webpack-cli v4 |
Same there. But when will it get fixed? |
Can you try |
@snitin315 What is the difference between |
Yes webpack-cli v4 comes with out of box support of |
We need to add try/catch to our cli when we require module from webpack-cli and output a warning to use webpack serve to run webpack dev server |
Able to reproduce the bug in Windows. |
Can you provide an example of how we replace the use of devServer in our webpack config file with serve? |
Please update |
How are environment options passed to
Passing the same argument to
I'm not seeing how to pass anything other than booleans to
|
I would hope since it seems it is understood what is needed for webpack-dev-server to work with webpack 5, the authors would put a fix in ASAP to resolve this issue. I too am trying webpack serve, and am not able to get it to work. In the future, when suggesting a change like this, it would be extremely beneficial to provide a simple example of how it should work. As it is, it seems this requires knowledge or figuring out how serve works which is different than how webpack-dev-server works. |
I also had to reinstall webpack dev server (v3.11.0) to make it work. |
webpack-dev-server doesn't work at webpack-cli v4 c.f. webpack/webpack-dev-server#2759
ERROR in main webpack 5.0.0 compiled with 1 error in 521 ms what should I do? |
@wanliyunyan Should be
|
thank you,............. |
The migration guide says we should be using webpack-dev-server instead of serve: ``
Furthermore HMR no longer works when I switch to 'serve'. The browser console logo shows |
That Regarding the HMR, you might have the similar issue as #2758 if you have browserslist in your project. |
@YahzeeSkellington as @chenxsan said, I removed "browsersList" from package.json and hot reload work well. |
webpack serve did not serve well :) Ran into more errors. Finally reverted to |
Please stop spam, we known about the problem and we provide solution above, we need additional try/catch in our bin and provide friendly error |
Operating System: kali-2020
Node Version: v10.21.0
NPM Version: 6.14.7
webpack Version: ^5.0.0
webpack-dev-server Version:^3.11.0"
This is a bug
This is a modification request
Code
Expected Behavior
webpack-dev-server should compile
Actual Behavior
Error: Cannot find module 'webpack-cli/bin/config-yargs'
webpack-dev-server is dependent on the webpack-cli. looks like it has been updated 13 hours ago to version 4.0.0 so its folder structure has changes. here is the current folder structure:
this is the older folder structure i just created a few days ago:
The text was updated successfully, but these errors were encountered: