You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run my vite app on aws ec2 linux instance into docker container.
I have a get request in vite (from vite to some other API): http://173.33.1.196:9000/renewal
The requests from vite are stuck, but the simple: curl -X GET http://173.33.1.196:9000/renewal from container works well.
So the issue is not related to connection/network configuration, but to vite app. there are no any warnings or errors in the logs
I ran sudo tcpdump -i eth0 tcp dst 173.33.1.196 to see the packages and I see that there is no any traffic from vite app, but I see the packages when I use curl.
Here is added my vite.config.js file:
`
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import url from "url";
import sass from "sass";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
define: {
"process.env": env,
},
plugins: [react()],
css: {
preprocessorOptions: {
scss: {
implementation: sass,
additionalData: @use "sass:math";,
},
},
},
resolve: {
alias: {
"@": ${__dirname}/src,
},
},
esbuild: {
jsxInject: ``,
},
server: {
watch: {
usePolling: true,
},
host: true, // needed for the Docker Container port mapping to work
strictPort: true,
port: 5173, // you can replace this port with any port
},
};
});
`
BTW I can't reproduce that on my windows: when I build the docker images locally (the same way I build it automatically for ECR) I don't have this issue.
Will very appreciate any idea what I'm doing wrong or maybe it's some bug ?
Thank you & best regards
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I run my vite app on aws ec2 linux instance into docker container.
I have a get request in vite (from vite to some other API):
http://173.33.1.196:9000/renewal
The requests from vite are stuck, but the simple:
curl -X GET http://173.33.1.196:9000/renewal
from container works well.So the issue is not related to connection/network configuration, but to vite app. there are no any warnings or errors in the logs
I ran
sudo tcpdump -i eth0 tcp dst 173.33.1.196
to see the packages and I see that there is no any traffic from vite app, but I see the packages when I use curl.Here is added my vite.config.js file:
`
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import url from "url";
import sass from "sass";
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
define: {
"process.env": env,
},
plugins: [react()],
css: {
preprocessorOptions: {
scss: {
implementation: sass,
additionalData:
@use "sass:math";
,},
},
},
resolve: {
alias: {
"@":
${__dirname}/src
,},
},
esbuild: {
jsxInject: ``,
},
server: {
watch: {
usePolling: true,
},
host: true, // needed for the Docker Container port mapping to work
strictPort: true,
port: 5173, // you can replace this port with any port
},
};
});
`
BTW I can't reproduce that on my windows: when I build the docker images locally (the same way I build it automatically for ECR) I don't have this issue.
Will very appreciate any idea what I'm doing wrong or maybe it's some bug ?
Thank you & best regards
Beta Was this translation helpful? Give feedback.
All reactions