localhost:5000 doesn't work after running npm run dev #184
Comments
It sounds like you may be using a VM?
|
Hmm... I'm not using a VM. I just tried accessing |
Same here. Svelte doesn't seem to work well with mac. Tried it 4 months ago, and about 3 months before that. It just doesn't work well on mac. Everytime had an issue. What version should all the tools be? Node, npm, etc. |
Ok, so it breaks if I use NPM, it works if use yarn instead (no idea why, in my experience npm beats yarn every time with stability and reliability). Please do take this issue seriously, reason is this causes svelte's bounce rate to sky rocket if the hello world doesn't work (on the main page!). Trying a bit more complex stuff now, last time Svelte bombed when adding just a basic theme. This isn't the first time I experienced the issue. Every few months I try Svelte to see if the hello world actually works. If a tool's hello world breaks, it gives little hope to continue further. Theoretically on paper Svelte is brilliant and that is why I keep coming back. I want a replacement for React.js (and also want to drop yarn). I suspect Svelte can be a lot bigger if this small issue is fixed. Will take a look later at this issue once I have the time to invest (beauty of open source). So for now, solution is to use: (Yarn version is 1.18.0 at time of comment). |
I have the same issue. Using Steps to reproduce:
Strange but not a dealbreaker. If more info is needed let me know :) |
Having a similar problem. \node_modules\sirv\build.js:163 TypeError: parser is not a function and the browser says "This site can't be reached" |
@katsully Please update to the latest |
Thank you!! |
Hello, my |
I'm running on an M1 Mac (macOS Monterey 12.0.1)... I've just started having a dabble in Svelte and tried the template project, and I was getting an 'Access to localhost was denied' page in Chrome (Error 403), but as @Zajozor mentioned, After further digging, I found a post on Reddit about port 5000 being taken by Airplay Receiver. Disabling this in System Preferences->Sharing->AirPlay Receiver, seems to do the trick (ie. http://localhost:5000 now works). Still confused as to why 127.0.0.1 would work before, but not localhost! |
@tnaseem Thank you! |
Also on a Mac and same issue as @tnaseem. Airplay Receiver taking port 5000 sounds plausible. Having In {
"scripts": {
"start": "sirv public --single --port 5555",
}
} Now http://localhost:5555 works as http://localhost:5000 once did. |
This solution works for m1 monterey. Thank you @bryik. |
I'm also using M1 macOS Monterey 12.0.1 and facing this issue. Thanks for your information so I can change the port of host beside 5000 as @bryik mentioned. "scripts": { |
Just came across this when starting from the template for a quick prototype project. This is going to happen by default to a lot of MacOS Monterey users because the Airplay receiver service blocks ports 5000 unless disabled. Ultimately from an onboarding perspective this will be a bit of a hassle if someone runs into it, especially on a template, which may be used by someone new to svelte or even new to javascript. I Just raised the question in the Sirv repo as well: I'm thinking it should maybe at least be documented in the template repo? |
Worked like a charm, thanks. |
Savior of the day |
@tnaseem it work Thank you! |
If you don't want to disable Airplay - you can just change port, for example, for 4000 :) |
looks like the issue is with macOS Monterey 12.0.1) |
Try changing the port.
…On Thu, 6 Jan 2022, 22:34 Rich Harris, ***@***.***> wrote:
Closed #184 <#184> via #278
<#278>.
—
Reply to this email directly, view it on GitHub
<#184 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN7DFCQMDGRWEF5XB63D7QDUUXVERANCNFSM4TYPHOGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi, there.
I'm new to Svelte, and I've been trying to follow the "Svelte for new developers" blog article on Svelte's website to set up a new Svelte project.
After carefully following all of the instructions and running
npm run dev
, I receive the expected output in the terminal but when I navigate tohttp://localhost:5000/
in my browser (Chrome), I'm met with the message "This site can’t be reached."I've followed the tutorial many times and the only thing that's helped is this StackOverflow answer that tells me to "declare the environment variable
HOST=0.0.0.0
."Running
npm run dev
works after that, but Chrome tells me the site I'm on is not secure.I'm just wondering why
http://localhost:5000/
just isn't working for me and if there's anything I can do to simply set up my project the way the tutorial teaches.The text was updated successfully, but these errors were encountered: