What it means
A command in the build ran npm run build. npm looked in package.json for a script named build and found none. The build says it in one sentence: package.json has no such script, but the build needs one.
How to fix it
Add the script. Put a build script in package.json that builds your project, for example "build": "vite build" or "build": "tsc".
Or remove the call. If your project needs no build, find the command that runs npm run build and remove it.
{
"scripts": {
"build": "vite build",
"start": "node server.js"
}
}
Static sites
A frontend that builds to files, such as Vite, Create React App, Astro or Gatsby, needs a build script. Without one there is no output folder to serve, and Antideploy tells you so. See how to deploy a Vite React app.