Cannot find module '@tailwindcss/forms'

I have an error deploying my app - Cannot find module ‘@tailwindcss/forms’

9:57:38 PM: [vite:css] Cannot find module ‘@tailwindcss/forms’

9:57:38 PM: Require stack:

9:57:38 PM: - /opt/build/repo/tailwind.config.cjs

9:57:38 PM: - /opt/build/repo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js

9:57:38 PM: - /opt/build/repo/node_modules/tailwindcss/lib/index.js

9:57:38 PM: - /opt/build/repo/postcss.config.cjs

Hi @pcherkashin

Is @tailwindcss/forms listed as a dependency in the package.json of the repository you are deploying?


“devDependencies”: {
@tailwindcss/forms”: “^0.5.2”,

Can you share the repository you are deploying from?

@tailwindcss/forms is neither under dependencies or devDependencies in the repository you shared. I only see tailwindcss listed under devDependencies.

Perhaps you have added it locally but have not committed it yet?

@coelmay Thank you for your support! I’ve deployed the app! I add tailwindforms in dependencies and devdependencies - or I could add only to dependencies?

You only need to add it to one or the other. Check out the Manage build dependencies about why you might use one and not the other