[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Module package not found: @tailwindcss/vite. What is the possible cause? while deploying on vercel

184 views · 4 likes · 4 posts


Temmytizzy201 7159 (@temmytizzy201-7159) · 2025-12-03

i dont know what went wrong, have been trying to deploy to vercel but what i keep getting is package not found which is related to vite on react

```
failed to load config from /vercel/path0/vite.config.jserror when starting dev server:Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package ‘@tailwindcsstailwindcsstailwindcsstailwindcsstailwindcsstailwindcsstailwindcsstailwindcss/vite’ imported from /vercel/path0/node_modules/.vite-temp/vite.config.js.timestamp-1764666607979-281cc1632e3e2.mjsat Object.getPackageJSONURL (node:internal/modules/package_json_reader:316:9)at packageResolve (node:internal/modules/esm/resolve:768:81)at moduleResolve (node:internal/modules/esm/resolve:858:18)at defaultResolve (node:internal/modules/esm/resolve:990:11)at #cachedDefaultResolve (node:internal/modules/esm/loader:737:20)at ModuleLoader.resolve (node:internal/modules/esm/loader:714:38)at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:293:38)at #link (node:internal/modules/esm/module_job:208:49)Error: Command “npm run dev” exited with 1
{“name”: “my-react-app”,“private”: true,“version”: “0.0.0”,“type”: “module”,“scripts”: {“dev”: “vite”,“build”: “vite build”
vite.config.jsimport { define@tailwindcssonfig } from ‘v@vitej@vitej@vitej@vitej@vitej@vitej@vitej@vitejsvite@vitej@vitejsste’import react from ‘@vitejs/plugin-react’i@tailwindcs@tailwindcs@tailwindcs@tailwindcs@tailwindcs@tailwindcs@tail@tailwindcssindcs@tailwindcs@tailwindcs@tailwindcssport tailwindcss from ‘@tailwindcss/vite’// https://vite.dev/config/export default defineConfig({plugins: \[react(),tailwindcss(),\]})
```
not finding `tailwindcss/vite`

react, vite and tailwindcss

![Screenshot 2025-12-03 094738|690x243](upload://bKaMTjOywksy3hc9RL4tPWmX74L.png)


Pauline P. Narvas (@pawlean) · 2025-12-03 · ♥ 2

Looking at your error, it seems like there’s a corrupted import in your `vite.config.js` file. The error shows repeated `@tailwindcss` text which suggests the file got mangled somehow.

Here’s how to fix it:

## [](#p-86422-fix-your-viteconfigjs-1)Fix your vite.config.js

Replace your current `vite.config.js` with this clean version:

`import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite'  // https://vite.dev/config/ export default defineConfig({   plugins: [     react(),     tailwindcss(),   ], })`

## [](#p-86422-install-the-correct-tailwind-css-package-2)Install the correct Tailwind CSS package

Make sure you have the right Tailwind CSS Vite plugin installed:

`npm install -D @tailwindcss/vite`

## [](#p-86422-alternative-approach-3)Alternative approach

If you’re still having issues, you can use the traditional Tailwind setup instead:

1.  Install Tailwind the standard way:

`npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p`

2.  Update your `vite.config.js` to:

`import { defineConfig } from 'vite' import react from '@vitejs/plugin-react'  export default defineConfig({   plugins: [react()], })`

3.  Add Tailwind directives to your CSS file:

`@tailwind base; @tailwind components; @tailwind utilities;`

The corrupted file is likely causing the module resolution issues you’re seeing.


Avik Creator (@avik-creator) · 2025-12-03 · ♥ 2

I think he has done those I guess according to the latest chat in here. 

https://community.vercel.com/t/im-trying-to-deploy-my-project-on-vercel-but-it-keeps-saying-cant-find-package-tailwindcss-vite/29030/5

I think you can take some idea from here. 

https://stackoverflow.com/questions/79504633/vercel-problem-when-deploying-my-next-js-project-to-vercel

If it not done, can I see the repo once to get the error that might be there?


Muhammadasad20 (@muhammadasad20) · 2025-12-10

{

  "rewrites": \[

    { "source": "/(.\*)", "destination": "/" }

  \]

}
add vercel.json file in your project