Reputation: 1
I've set up React, Vite, and Tailwind CSS according to the documentation, but it is showing me the error below after running vite
:
failed to load config from C:\Users\HP\Desktop\ecommerce\vite.config.js error when starting dev server: Error: The specified module could not be found. \?\C:\Users\HP\Desktop\ecommerce\node_modules@tailwindcss\oxide-win32-x64-msvc\tailwindcss-oxide.win32-x64-msvc.node at Module. extensions ..
The same setup on another PC is working very well.
I've installed Tailwind CSS using the command:
npm install tailwindcss @tailwindcss/vite
I've configured the Vite plugin.
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
});
@import "tailwindcss";
My Node version is 18.20.6, and I also updated it to 23.6, but it's still not working.
Upvotes: 0
Views: 502
Reputation: 11
I have also faced the same issue then i did this and it perfectly worked for me
Uninstall Node.js:
Install Node.js v22:
Restart VS Code:
Install Tailwind CSS v4:
Upvotes: 1
Reputation: 1
Install the Latest Microsoft Visual C++ Redistributable Version https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
Then restart your device, then again install tailwindcss v4.0 it will work.
Upvotes: 0