hey so i am using vercel to deploy my react project with vite as the framework and it worked at first when running the build from visual studio code and connecting it to vercel using the vercel CLI then to just test that i can update the project through using git like committing and pushing
changes to the repository that it updates the deployed project on vercel , i made a heading change then commited and pushed it but now i get a failed deploy and the errors saying ; sh: line 1: vite: command not found Error: Command “vite build” exited with 127 , yet vite is included as a devdependency in my package.json,
Below is my package.json ;
{
"name": "game-hub",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@chakra-ui/react": "^3.2.3",
"@chakra-ui/theme": "^3.4.6",
"@chakra-ui/theme-tools": "^2.2.6",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"axios": "^1.7.9",
"framer-motion": "^11.15.0",
"next-themes": "^0.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^4.12.0"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@types/node": "^22.10.2",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.6",
"vite-tsconfig-paths": "^5.1.4"
}
}
Below are my build settings
-I have tried re-installing node modules but did not work, i tried manually changing “vite”: “^6.0.6”, to be in dependencies instead of devdependencies but did not work