-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the bug
I'm developing locally with Inertia.js, Vue.js, and Laravel without any issues. However, when I use my repository in GitHub Codespaces, I encounter "ERR_CONNECTION_REFUSED" errors. My local development environment is started with npm run dev and php artisan serve, where the former runs on port 5173 and the latter on port 8000. In Codespaces, however, resources under these ports cannot be loaded (console error messages for app.js, client, and Home.vue). How can I properly configure these ports in GitHub Codespaces, or is there another recommended approach to resolve these connection issues?
Reproduction
Steps to reproduce
Install Laravel with Inertia.js and vue and run "npm run dev" and "php artisan serve". Open the website in browser.
System Info
Github CodespacesUsed Package Manager
npm
Logs
When I run npm run dev, I receive the following console output:
VITE v5.2.8 ready in 265 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
LARAVEL v11.3.1 plugin v1.0.2
➜ APP_URL: http://localhost
When I run php artisan serve, I receive the following console output:
INFO Server running on [http://127.0.0.1:8000].
Upon accessing the website using the URL generated by php artisan serve, I receive the following error messages in the developer console:
client:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
app.js:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
Home.vue:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
According to the Network tab, the following request URLs were used:
- http://[::1]:5173/@vite/client
- http://[::1]:5173/resources/js/app.js
- http://[::1]:5173/resources/js/Pages/Home.vue
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.