Cannot find module 'tailwindcss' nextjs build #67607
-
SummaryHi, I've just created a new project with I tried deploying in production to see the complete path from development to deployment. After the creation command, I deleted the node_modules folder to start with a fresh installation of the dependencies for the production deployment (and because I don't want any development dependencies in production), I set my environment variable
So yes, I realize that tailwindcss is in the devDependancies, but I can't find anything about putting it into production without having to install the dev dependancies and therefore having the lightest application possible and reducing the risk of vulnerabilities. If anyone can help me, I've been going round in circles for 2 days without finding a solution >< I have the original source code (generated by the app creation command) without any modification, so I don't understand why the build can't work. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
A package listed under "dev dependencies" is meant for use during development and building. It's not included in the final build that will be served to the end user, but it's still needed for the build process. In this example, tailwind will be used in the build process to generate the CSS needed for the final build that users will see.
|
Beta Was this translation helpful? Give feedback.
-
For me works the next: npm i -g pnpm |
Beta Was this translation helpful? Give feedback.
A package listed under "dev dependencies" is meant for use during development and building. It's not included in the final build that will be served to the end user, but it's still needed for the build process. In this example, tailwind will be used in the build process to generate the CSS needed for the final build that users will see.