Issue accessing GitHub Codespaces Preview URL or Localhost Link #50
Replies: 4 comments 7 replies
-
@hamitsehjal - do you still need assistance with this issue? |
Beta Was this translation helpful? Give feedback.
-
Thanks @hamitsehjal! This is very helpful to see, and to confirm, in the Terminal tab you see your site running from the Also, if possible, to get a link to your repo that would be helpful as well. |
Beta Was this translation helpful? Give feedback.
-
Glad to hear this is working for you! ✨ Was this the same Codespace you had been working in, or did you create a new one for the project? I am curious as well as to what has changed, we have made no updates to that project or Codespace settings. I will see if I can check the change log for Codespaces to see if we can satisfy our curiosity as to what the solution was. |
Beta Was this translation helpful? Give feedback.
-
I had this same issue and solved it. its easy. On my laptop I opened command pallet and searched for codespaces and clicked on add dev container configuration files and added the ports that were generated from codespaces. Then in my package.json I made a change, see below. I am able to use my laptop and everything works great when I run the server {
"image":"mcr.microsoft.com/devcontainers/universal:2",
"appPort": 5173,
"forwardPorts": [5173]
} "dev": "vite --host 0.0.0.0", |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I've been working on the personal website project using GitHub Codespaces, and I noticed an unusual behavior. When I run my application using
npm start
, the development server starts, and it tells me that the app is accessible athttp://localhost:1234
. However, upon clicking the link, my browser opens a different URL, namelyhttps://hamitsehjal-reimagined-winner-rw9vwgr9pv6f5wqj-1234.preview.app.github.dev/
.From my research, this redirection is due to a feature called "Port Forwarding" or "Ports Preview" in GitHub Codespaces. It generates a unique URL for each exposed port, allowing access to the locally running application through a publicly accessible URL.
The issue I'm facing is that when I try to access either
http://localhost:1234
orhttps://hamitsehjal-reimagined-winner-rw9vwgr9pv6f5wqj-1234.preview.app.github.dev/
, I get an error message saying 'can't reach this page'. This is preventing me from testing my application through the preview URL.Could you please help me understand why I'm experiencing this issue? Are there any specific configurations or steps I need to follow to access my application through the provided preview URL?
Thank you for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions