[Bug] Local development server broken
See original GitHub issueI’m noticing that fresh installs of React Static displays an empty page in develop mode ($ react-static start
) and the console outputs SyntaxError: The URL 'http:/[http//localhost]:300' is invalid
from SockJS. This occurs after running yarn upgrade in a previously working repo in either RS 6.3.x or 7.0.x. Seems that this is related to the 3.3.0 update of webpack-dev-server (possibly this change?).
Adding this to my project’s package.json and reinstalling dependencies fixes development builds. This confirms that something is borked in an update of webpack-dev-server.
"resolutions": {
"react-static/webpack-dev-server": "~3.1.10"
}
Environment
System:
OS: macOS 10.14.4
CPU: (4) x64 Intel(R) Core(TM) i5-6287U CPU @ 3.10GHz
Memory: 228.44 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 73.0.3683.86
Firefox: 66.0.2
Safari: 12.1
npmPackages:
react-ga: ^2.5.7 => 2.5.7
react-markdown: ^4.0.6 => 4.0.6
react-moment: ^0.8.4 => 0.8.4
react-static: ^7.0.7 => 7.0.7
react-static-plugin-reach-router: ^7.0.0 => 7.0.0
react-static-plugin-sitemap: ^7.0.0 => 7.0.0
react-static-plugin-source-filesystem: ^7.0.0 => 7.0.0
Steps to Reproduce the problem
npx react-static create
- create site and cd in
yarn upgrade
to install latest dependenciesyarn start
- navigate to
http://localhost:3000
- See broken site? Open console.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:34 (9 by maintainers)
Top Results From Across the Web
Development server broken on fresh install #7571 - GitHub
Development server broken on fresh install #7571. bug An error in the Docusaurus core causing instability or issues with its execution status: ...
Read more >Django development server broken pipe error - Stack Overflow
This happens when the client closes the connection before the server finished sending the data. If it only happens sometimes and is not...
Read more >Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >224215 - Can't access a local webserver anymore - chromium
Confirmed that this broke between 10.8.2 and 10.8.3, and that disabling built-in asynchronous DNS fixes the issue using AppEngine at localhost:8080.
Read more >Local Development Server for Lightning Web Components
I'm trying to set a Local Development Server for Lightning Web Components according to this link but when I try to install the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Find a workaround, add the following to packages.json, then
yarn
:Same, still happens with 7.0.9, but this worked for me