Delete the file named hot inside the public directory. Seems you accidentally added it to the deployment. It's made when running the dev server
net::ERR_connection_refused when deploying laravel 9 app with laravel forge
Hello everybody,
I'm facing an issue since this this morning and i cannot solve it in any way, I've tried to destroy and recreate several times my server, tried to change configurations but i cannot get it to work the same.
I'm deploying via laravel forge an app created with laravel 9, the app load at the domain but there's no way that my css/js are loaded.
I'm getting in my console the following errors :
GET http://127.0.0.1:5174/resources/css/app.css net::ERR_CONNECTION_REFUSED
resellhotels.com/:26 GET http://127.0.0.1:5174/@vite/client net::ERR_CONNECTION_REFUSED
resellhotels.com/:26 GET http://127.0.0.1:5174/resources/js/app.js net::ERR_CONNECTION_REFUSED
You can see it at resellhotels.com . I've tried to follow several online guides but the error is still there; I think this issue is caused by VITE.
My .gitignore looks like this :
/node_modules
!/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
readme.md
server.md
and my vite.config.js
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";
export default defineConfig({
plugins: [
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
refresh: true,
}),
],
resolve: {
alias: {
"~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
},
},
server: {
watch: {
usePolling: true,
host:'0.0.0.0',
},
},
});
Is there anybody who can help me to solve this issue? Thank you very much.
@Sinnbeck sorted It out. I don't know how, after each deploy the server was generating a new hot file.
I noticed it when i SSH into the server to manually delete the hot file.
Tried to restart and did not solve the issue. Had to destroy and recreate It.
Please or to participate in this conversation.