Vite start command keeps restarting

So i have a react app in vite. I’m using npm run build but the server keeps restarting the build command while its still transforming.

✓ 862 modules transformed.

May 8 09:07:12 PMrendering chunks…

May 8 09:07:12 PMcomputing gzip size…

May 8 09:07:12 PMdist/index.html 0.69 kB │ gzip: 0.38 kB

May 8 09:07:12 PMdist/assets/index-CvLhU_Uw.css 125.72 kB │ gzip: 16.29 kB

May 8 09:07:12 PMdist/assets/index-CqHIbbuz.js 854.73 kB │ gzip: 218.29 kB

May 8 09:07:12 PM

May 8 09:07:12 PM(!) Some chunks are larger than 500 kB after minification. Consider:

May 8 09:07:12 PM- Using dynamic import() to code-split the application

May 8 09:07:12 PM- Use build.rollupOptions.output.manualChunks to improve chunking: https ://rollupjs.org/configuration-options/#output- manualchunks

May 8 09:07:12 PM- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

May 8 09:07:12 PM✓ built in 1m 18s

May 8 09:07:27 PM==> No open ports detected, continuing to scan…

May 8 09:07:27 PM==> Docs on specifying a port: https :// Web Services | Render Docs

May 8 09:07:44 PM==> Using Node version 20.12.2 (default)

May 8 09:07:44 PM==> Docs on specifying a Node version: https:// Setting Your Node.js Version | Render Docs

May 8 09:07:44 PM==> Using Bun version 1.1.0 (default)

May 8 09:07:44 PM==> Docs on specifying a bun version: https ://render.com/docs/bun-version

May 8 09:07:46 PM==> Running ‘npm run build’

May 8 09:07:48 PM==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

Hi there,

Can you please provide your Build Command and Start Command? This type of problem typically surfaces when one or both of those commands are misconfigured.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

Hi Mike,

I had the same issue while deploying.
build command : pnpm run build
start command: pnpm run dev

I resolved it by specifying additional CLI option for start command as,

pnpm run dev -- --host 0.0.0.0 --port 3000

Thanks for sharing your solution, Yasela!

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)