Vite build failed while deploying but it works fine in the localhost

Running build command ‘npm run build’…

Jul 29 01:53:08 PM

Jul 29 01:53:08 PM> server@1.0.0 build

Jul 29 01:53:08 PM> npm install && npm install --prefix client && npm run build --prefix client

Jul 29 01:53:08 PM

Jul 29 01:53:08 PM

Jul 29 01:53:08 PMup to date, audited 184 packages in 661ms

Jul 29 01:53:08 PM

Jul 29 01:53:08 PM17 packages are looking for funding

Jul 29 01:53:08 PM run npm fund for details

Jul 29 01:53:08 PM

Jul 29 01:53:08 PMfound 0 vulnerabilities

Jul 29 01:53:09 PM

Jul 29 01:53:09 PMadded 37 packages, and audited 38 packages in 900ms

Jul 29 01:53:09 PM

Jul 29 01:53:09 PM2 packages are looking for funding

Jul 29 01:53:09 PM run npm fund for details

Jul 29 01:53:09 PM

Jul 29 01:53:09 PMfound 0 vulnerabilities

Jul 29 01:53:09 PM

Jul 29 01:53:09 PM> client@0.0.0 build

Jul 29 01:53:09 PM> vite build

Jul 29 01:53:09 PM

Jul 29 01:53:09 PMsh: 1: vite: not found

Jul 29 01:53:09 PM==> Build failed :disappointed:

Jul 29 01:53:09 PM==> Common ways to troubleshoot your deploy: Troubleshooting Your Deploy – Render Docs

Hello, can you share your package.json please?

Hey,

See “vite: not found”. “vite” is not part of our native runtimes so you’ll need to make sure you install it before you invoke it.

Jérémy.
Render Support, UTC+3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.