question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Local development server broken

See original GitHub issue

I’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

  1. npx react-static create
  2. create site and cd in
  3. yarn upgrade to install latest dependencies
  4. yarn start
  5. navigate to http://localhost:3000
  6. See broken site? Open console.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:22
  • Comments:34 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
J-F-Liucommented, Apr 16, 2019

Find a workaround, add the following to packages.json, then yarn:

  "resolutions": {
    "react-static/webpack-dev-server": "3.2.1"
  }
3reactions
andrezerocommented, Apr 16, 2019

Same, still happens with 7.0.9, but this worked for me

  "resolutions": {
    "react-static/webpack-dev-server": "3.2.1"
  }
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found