Update the build script in package.json:
build
package.json
"scripts": { "build": "chmod +x node_modules/.bin/vite && vite build" }