Skip to content
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

Providing a static file directory breaks React Storybook #47

Closed
submitteddenied opened this issue Apr 5, 2016 · 4 comments
Closed

Providing a static file directory breaks React Storybook #47

submitteddenied opened this issue Apr 5, 2016 · 4 comments

Comments

@submitteddenied
Copy link

If you use the -s flag to provide a static file directory, the express routing appears to break and the app fails to load.

@arunoda
Copy link
Member

arunoda commented Apr 5, 2016

what was the error you got? please provide the stack trace

@submitteddenied
Copy link
Author

No errors in the console (the express app works), but the browser console shows:

http://localhost:9001/screen.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9001/index.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9001/screen.css Failed to load resource: the server responded with a status of 404 (Not Found)

This is because the static files middleware is taking precedence over the webpack middlewares and failing to load the built files.

@arunoda
Copy link
Member

arunoda commented Apr 5, 2016

Hmm. I can't reproduce this issue.
Could you send some way, I can reproduce this error.

@submitteddenied
Copy link
Author

Ah found the problem, my static file directory had an index.html which was being served by the static middleware. Renaming this file (to something other than index.html) resolved the problem.

ndelangen pushed a commit that referenced this issue Apr 5, 2017
ndelangen pushed a commit that referenced this issue Apr 5, 2017
ndelangen pushed a commit that referenced this issue Apr 23, 2017
ndelangen pushed a commit that referenced this issue Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants