Webpack-dev-server: parent directories with spaces don't seem to be supported

Created on 11 Apr 2018  路  5Comments  路  Source: webpack/webpack-dev-server

  • Operating System: Windows 10 Home v1709 Build 16299.371
  • Node Version: 9.11.1
  • NPM Version: 5.6.0
  • webpack Version: 4.4.0
  • webpack-dev-server Version: 3.1.1
  • [x] This is a bug
  • [ ] This is a modification request

Information and problem details found at
https://stackoverflow.com/questions/49763540/webpack-webpack-dev-server-react-shows-directory-listing-when-it-should-show-app

Code

Not my code, but a simple starter repo I've used for testing:
https://github.com/bradtraversy/react_webpack_starter

Expected Behavior

App runs, worked on one computer until issue was solved.

Actual Behavior

Shows Directory listing instead of app, same code/repo worked on one computer but not another. See github issue for more information.

For Bugs; How can we reproduce the behavior?

I used my C drive to isolate the issue.

mkdir "test test" // works if the directory is testtest
cd "test test"
git clone https://github.com/bradtraversy/react_webpack_starter
cd react_webpack_starter
npm install
npm start (runs webpack-dev-server --mode development --open --hot)

For Features; What is the motivation and/or use-case for the feature?

Most helpful comment

Same here, I've wasted 14 hours to figure out why this happening.
Just downgrade webpack-dev-server to exact v3.1.1 or remove all spaces in project path till fix.

All 5 comments

workaround would be to put your project where there are no spaces in the absolute path. Unfortunately, all my projects are in my user directory (C:/Users/John Doe), which is not trivial to change :(

Found it in webpack-serve as well.

They redirected the issue to possibly webpack-dev-middleware since it is a common thread and a likely place.

Any other possible thoughts, clues, or insights?

Same here, I've wasted 14 hours to figure out why this happening.
Just downgrade webpack-dev-server to exact v3.1.1 or remove all spaces in project path till fix.

@frontendmonster yea I moved all my projects on that computer to a different root. Couldn't remove spaces because they were in my username. I'll request on all future work computers they refrain from making usernames with spaces lol

Fixed in https://github.com/webpack/webpack-dev-middleware/commit/e606cf1fa747b9b6d828dc259d346d1cf2f0d549, if somebody still have problem feel free to feedback thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eyakcn picture eyakcn  路  3Comments

MJ111 picture MJ111  路  3Comments

mischkl picture mischkl  路  3Comments

movie4 picture movie4  路  3Comments

adiachenko picture adiachenko  路  3Comments