Sh: 1: vite: not found help me

I have encountered the problem with vite dependency during build stage. Logs: 2025-12-12T08:44:03.188787173Z ==> Downloading cache…
2025-12-12T08:44:03.233111166Z ==> Cloning from
2025-12-12T08:44:04.588143805Z ==> Checking out commit 2bcde97cecca7d3f1b8d14ac68687c1b8a66f943 in branch added-vite-dependency
2025-12-12T08:44:06.958468094Z ==> Downloaded 73MB in 1s. Extraction took 1s.
2025-12-12T08:44:12.338882282Z ==> Using Node.js version 22.16.0 (default)
2025-12-12T08:44:12.363406347Z ==> Docs on specifying a Node.js version:
2025-12-12T08:44:12.474226154Z ==> Running build command ‘npm install && npm run build’…
2025-12-12T08:44:20.147340636Z
2025-12-12T08:44:20.147363967Z up to date, audited 1 package in 8s
2025-12-12T08:44:20.148162849Z
2025-12-12T08:44:20.148190069Z found 0 vulnerabilities
2025-12-12T08:44:20.31665362Z
2025-12-12T08:44:20.31667518Z > talentiq@1.0.0 build
2025-12-12T08:44:20.31668236Z > npm install --prefix backend && npm install --prefix frontend && npm run build --prefix frontend
2025-12-12T08:44:20.31669053Z
2025-12-12T08:44:21.105374126Z
2025-12-12T08:44:21.105394167Z added 83 packages, and audited 84 packages in 736ms
2025-12-12T08:44:21.105403067Z
2025-12-12T08:44:21.105424788Z 22 packages are looking for funding
2025-12-12T08:44:21.105449968Z run npm fund for details
2025-12-12T08:44:21.106396514Z
2025-12-12T08:44:21.106406484Z found 0 vulnerabilities
2025-12-12T08:44:21.767350075Z
2025-12-12T08:44:21.767370675Z up to date, audited 14 packages in 603ms
2025-12-12T08:44:21.768097395Z
2025-12-12T08:44:21.768112135Z found 0 vulnerabilities
2025-12-12T08:44:21.866902855Z
2025-12-12T08:44:21.866921096Z > frontend@0.0.0 build
2025-12-12T08:44:21.866925406Z > vite build
2025-12-12T08:44:21.866928926Z
2025-12-12T08:44:21.871162261Z sh: 1: vite: not found
2025-12-12T08:44:21.918410782Z ==> Build failed :disappointed_face:
build command: npm run build.

start command: npm run start.

frontend/package.json: {

“name”: “frontend”,

“private”: true,

“version”: “0.0.0”,

“type”: “module”,

“scripts”: {

“dev”: “vite”,

“build”: “vite build”,

“lint”: “eslint .”,

“preview”: “vite preview”

},

“dependencies”: {

“@clerk/clerk-react”: “^5.58.1”,

“react”: “^19.1.1”,

“react-dom”: “^19.1.1”,

“vite”: “^7.1.7”

},

“devDependencies”: {

“@eslint/js”: “^9.36.0”,

“@types/react”: “^19.1.13”,

“@types/react-dom”: “^19.1.9”,

“@vitejs/plugin-react”: “^5.0.3”,

“eslint”: “^9.36.0”,

“eslint-plugin-react-hooks”: “^5.2.0”,

“eslint-plugin-react-refresh”: “^0.4.20”,

“globals”: “^16.4.0”,

“vite”: “^7.1.7”

}

}

backend/package.json: {

“name”: “backend”,

“version”: “1.0.0”,

“description”: “”,

“main”: “src/server.js”,

“scripts”: {

“dev”: “nodemon src/server.js”,

“start”: “node src/server.js”

},

“keywords”: ,

“author”: “”,

“license”: “ISC”,

“type”: “module”,

“dependencies”: {

“dotenv”: “^17.2.3”,

“express”: “^5.1.0”,

“mongoose”: “^8.19.1”

},

“devDependencies”: {

“nodemon”: “^3.1.10”

}

}

package.json: {

“name”: “talentiq”,

“version”: “1.0.0”,

“description”: “”,

“main”: “server.js”,

“scripts”: {

“build”: “npm install --prefix backend && npm install --prefix frontend && npm run build --prefix frontend”,

“start”: “npm run start --prefix backend”

},

“keywords”: ,

“author”: “”,

“license”: “ISC”,

“type”: “commonjs”,

“devDependencies”: {

“vite”: “^7.1.7”

},

“dependencies”: {

“vite”: “^7.1.7”

}

}

I want to run a webservice in production mode.

do you have NODE_ENV set to production? If so, remove that and try again.

Yep, I solved the issue by rewriting scripts and package.json files

1 Like

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