-
-
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
configuration has an unknown property 'error' #1142
Comments
@7h3w4rd0c70r are you using webpack-dev-server via the CLI or the API? |
@shellscape via the CLI |
@7h3w4rd0c70r in that case we'll need a stripped-down repo from you to reproduce. I'm afraid we won't be able to triage this issue without one. |
@shellscape Ok, I've created a repo with replicated error. It has the exact same webpack configuration I'm using on project and gives the exact same error. Here: https://github.com/7h3w4rd0c70r/wds-misconfiguration-error |
Ok, after more digging, I've found an answer buried by google. Here it is: https://stackoverflow.com/a/46527969/5367254 Seems like global and local webpack-dev-server are killing each other. When I run |
But I still think this is a bug. At least you should get a different and appropriate error message. This is a problem of conflict between global and local packages, but you still get meesage
You should get an appropriate message, because this can and does lead to thinking that there is something wrong with your configuration.. @shellscape What do you think? |
We've got a known-issue with global versus local in the CLI. The fix for this was part of the refactor of the CLI code in the beta branch https://github.com/webpack/webpack-dev-server/blob/beta/cli.js#L19. I've been resisting doing double the work but this has popped up a few times more than I would consider to be isolated. Unfortunately I haven't been able to reproduce the global/local conflict on my machine (and your test repo doesn't throw an error for me, but I have no doubt it is on your machine). If you can open up your global and local webpack-dev-server directories and manually add a |
And forgot to mention, using "scripts": {
"dev": "webpack-dev-server"
} and npm run dev |
@shellscape Running the dev server from package.json scripts works perfectly! Thank you :) Al right, so it's a known issue, thats good. Well, when are you planing to release the version with the fix? Now I know what the problem is and how to 'solve' it, so I can wait (even a long time). But I'm just afraid that somebody else could end up with a few hours/days of debugging of a working code.. |
@7h3w4rd0c70r the beta will probably take a few more weeks before it's ready for a publish, and even then it's going to be on the |
@shellscape Ok, So I've done as you wanted and it seems like it solved the problem. Since you can't see it on your machine, I've recorded the fix for you: https://www.youtube.com/watch?v=LiRMrWy4G-c |
@7h3w4rd0c70r that's so awesome! thanks for recording that! OK so you have the option of creating a PR with that change to get commit credit for it, or I'll be happy to include your username in a commit and take care of it from my end. Which would you prefer? |
@shellscape Well, I tried to create PR, but I'm not sure which branch to edit and I don't have permission to create a new branch. So it will be probably better if you'll create the PR.. Thank you :) |
I had this issue too but while it's true that if you execute the script in |
@hammer65 not sure if this will help you, but give this a look https://msdn.microsoft.com/en-us/commandline/wsl/about. from what I understand, you may not need git bash any longer. |
My team and I are running into the same error as well. The configuration does not have "error", but we are being told there is an unknown property "error" when we run "webpack-dev-server" from the command line in windows. |
@lewismoten Just as @shellscape suggested above, try to start the webpack-dev-server from the npm scripts instead of directly from CLI. "scripts": {
"dev": "webpack-dev-server"
}
(Temporarily solution, until the bug is fixed.) |
It works for now. Looking forward to that bug fix. |
Should be fixed by a3f7277, version 2.9.3 |
Operating System: MacOS Sierra (10.12.6)
Node Version: v8.6.0
NPM Version: 5.3.0
webpack Version: ^3.6.0
webpack-dev-server Version: ^2.9.1
Code
webpack-dev-server throws this error message:
configuration has an unknown property 'error', though I don't have any property 'error' in my webpack.config.js (as can be seen bellow).
webpack.config.js
I'd normaly say that this is a problem on my side, but I've double checked the configuration many times and many times removed webpack and webpack-dev-server and installed them again, but this error stays... so I suppose this may be a bug in webpack-dev-server. Strange thing is, when I run
webpack
, it compiles without any error and bundles everything as it's supposed.Expected Behavior
webpack-dev-server should compile and bundle the code and start dev server.
Actual Behavior
webpack-dev-server
throws misconfiguration error.For Bugs; How can we reproduce the behavior?
Run
webpack-dev-server
with the configuration snippets above.For Features; What is the motivation and/or use-case for the feature?
EDIT:
I'm using
webpack-dev-server
via the CLIEDIT 2:
Here is a simplified repo with replicated error: https://github.com/7h3w4rd0c70r/wds-misconfiguration-error
The text was updated successfully, but these errors were encountered: