I am having the error : Error while running task C:xxxxx:build with message'spawn vite ENOENT'
I am using Vue 3, with Vue UI and my node version is v18.16.0
I installed this template for Vue with Bootstrap : https://www.creative-tim.com/product/vue-material-kit
It works fine when I run the dev version from Vue UI, website is running OK and I can modify files to customize the components.
But when I try to build a version for prod, I get the error Error while running task C:xxxxx:build with message'spawn vite ENOENT'
.
It seems to have a problem with Vite, but I never used it before and I cannot figure out what is the problem.
I found some posts on ENOENT errors, but not a single one related to Vite.
Here is the vite.config.js file which is in the project root :
import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});
I have no clue at the moment and my only idea is to totally remove Vite, but it seems to be a good dependency and I’d like to keep it.