-
Notifications
You must be signed in to change notification settings - Fork 226
Cannot find module 'tailwindcss/plugin' #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
same here |
Have you installed |
Of course
…On Wed, 30 Dec 2020 at 18:02, Adam Wathan ***@***.***> wrote:
Have you installed tailwindcss?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBPZCBFPRFS2FP3NUBVVN3SXNFI7ANCNFSM4VNLTMEQ>
.
|
Can you provide a GitHub repo that reproduces the issue? I can't reproduce this problem in a brand new project. |
I tried to replicate the issue here but wasn't able to: https://github.com/mnk179/tailwind-forms However, it seems to me that this has something to do with dependency resolution in my monorepo setup. I added: "workspaces": {
"nohoist": [
"@tailwindcss/forms",
"@tailwindcss/forms/**"
]
}, to my |
Ran into this, also in yarn workspaces-based monorepo. The nohoist solution seemed to work for me. I did notice that it looked like |
I'm getting the same issue. Its a basic cra and I followed the instructions from the tailwindcss documentation to set tailwind up. Here is my repo: https://github.com/AbreezaSaleem/surveys |
Same issue here, on Windows (development) it works fine, but on my production server (Ubuntu 20 with same NodeJS version as my Windows PC) I got this error. |
Same issue with other I am on a monorepo set up with yarn workspace. |
I'm in a yarn workspaces setup too, this solution doesn't seem to work for me. |
I deleted all "node_modules" folders and re-installed all dependencies, and all plugins worked properly! Maybe it is not a Tailwind CSS plugin issue. |
For anyone having this issue using Yarn workspaces, run this command in your project root:
This will make the modules accessible to |
The same here with a yarn workspace too. I think this is a regression with Tailwind 2. I have other workspaces with tw1 which work properly. |
This seemed to work locally for me but not in Production. Kind of silly, but the reason this was happening was: I had my tailwindcss plugin installed as a dev dependency in package.json. Since I don't install dev dependencies in Production, running |
I was getting this same error when using Tailwind CSS in a Nuxt.js app. There were no issues on my development PC where the app was set up using create-nuxt app, however, I'd get The solution was to manually install Tailwind CSS: Note that create-nuxt-app does define |
I got the error The problem (what I could figure out; please correct me if this is wrong): The workaround (what worked for me consistently): in the root package.json, add
I had to delete all Real solution (for tailwindcss maintainers): find a way to import that plugin.js in a hoist-compatible fashion. |
Got same error , but ran |
for me the only thing that worked is to install manually each plugin via npm (following instructions from plugin githup page):
and so on with all the plugin that i needed... |
Internally we are using tailwindcss/plugin, but we don't mark it as a peerDependency or a normal dependency in our package.json. This means that this plugin will fail in a monorepo environment when dependnecies get hoisted. This is because now there is no link to tailwind itself. Marking it as a peerDependency should fix this, because now there is a link. People that already have tailwind installed are good to go. People that use monorepo's should benefit from this additional information. Side not: NPM 7 starts installing peerDependencies for us https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md which is nice, because if we added an `explicit` dependency to Tailwind, then we would always reference our dependency and not the user's dependency. Closes: #31
Internally we are using tailwindcss/plugin, but we don't mark it as a peerDependency or a normal dependency in our package.json. This means that this plugin will fail in a monorepo environment when dependnecies get hoisted. This is because now there is no link to tailwind itself. Marking it as a peerDependency should fix this, because now there is a link. People that already have tailwind installed are good to go. People that use monorepo's should benefit from this additional information. Side note: NPM 7 starts installing peerDependencies for us https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md which is nice, because if we added an `explicit` dependency to Tailwind, then we would always reference our dependency and not the user's dependency. Closes: #31
@RobinMalfait I don't think #50 fixes it. I removed |
@imedadel if you are on NPM 7 it should help, but if the |
I'm using Yarn (the classic one) 😃 I guess a warning in the readme would be great |
Error: Cannot find module 'tailwindcss/plugin' Solution from tailwindlabs/tailwindcss-forms#31 (comment)
Error: Cannot find module 'tailwindcss/plugin' Solution from tailwindlabs/tailwindcss-forms#31 (comment)
Error: Cannot find module 'tailwindcss/plugin' Solution from tailwindlabs/tailwindcss-forms#31 (comment)
This works for me, Thanks! |
Working on codesandbox.io added 'tailwindcss' and 'postcss-flexbugs-fixes' using Dependencies section, after a coffee cup time a browser refresh was suggested with a nice '502 Bad Gateway' when done. The yarn start tab in Terminal tab, after a After that, this: But getting a new one: Big sight after, did a
End of the road? It's on codesandbox.io and other things to do. Solved deleting sandbox and started again. |
npm i @tailwindcss/forms and then npm run serve |
While coming across this error (module not found/could not find declaration) with the TailwindCSS aspect ratio plugin I found this solution that might be of use: #18 (comment) ... I created a file
Build works fine now. 😀 |
This is the solution that worked for me immediately |
If you faced this error ,(node:6819) unhandledpromiserejectionwarning: error: cannot find module 'tailwindcss' npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 |
I'm getting this error when building a project with: "devDependencies": { tailwind.config.js: module.exports = {
} -----> Building on the Heroku-20 stack -----> Using buildpack: heroku/nodejs -----> Node.js app detected -----> Creating runtime environment
-----> Installing binaries
-----> Restoring cache
-----> Installing dependencies
-----> Build
(node:2968) UnhandledPromiseRejectionWarning: Error: Cannot find module 'tailwindcss' Require stack:
(Use (node:2968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag (node:2968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. -----> Caching build
-----> Pruning devDependencies
-----> Build succeeded! -----> Discovering process types
-----> Compressing...
-----> Launching...
|
Exactly the same as above |
have you fixed it? (https://www.youtube.com/watch?v=YQLw5kJ1yrQ) < i fixed it with this video |
Yes i fixed. But mine tailwindcss error this is
unhandledPromiseRejectionWarning:Error:Cannot find module 'tailwindcss'
heroku error
…On Thu, Oct 28, 2021, 10:19 PM Rob Schilder ***@***.***> wrote:
@Bellcc <https://github.com/bellcc> This problem mostly occurs in a yarn
workspaces environment.
have you fixed it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APJ7CTONBRP22FOZLBBVGWLUJGEKJANCNFSM4VNLTMEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Faced the same issue, which got fixed with |
Installing what it can't find manually worked for me npm install tailwindcss/plugin |
i fixed this issue by adding below npm pkg |
Had the same issue while using with turborepo . adding as as dev dependency fixes it |
Yeah, for those struggling with turborepo & tailwind, check out this video: https://www.youtube.com/watch?v=YQLw5kJ1yrQ |
caused by new yarn workspace behaviour (tailwindlabs/tailwindcss-forms#31 (comment)) add tailwindcss to dependencies as temp fix, locked to same major version as used in @nuxtjs/tailwindcss
Install the plugin from npm : npm install -D @tailwindcss/forms |
This fix my issue thank you |
This solution worked for me: |
just delete "@tailwindcss/forms" line from devDependencies and move to dependencies. |
I fixed this problem by |
My issue was I forgot to install npm through sail. and run npm run dev or watch through sail. |
npm install tw-elements |
I had this issue today, the fix I found was to remove the @tailwindcss/plugin and instead use |
Anyone have an update on a proper fix for this? Nothing here works for me. |
I was running into this problem. I don't believe it is an issue with TailwindCSS itself, but rather the order of dependencies in your package.json. It appears that node orders the dependencies in alphabetical order. Meaning even if you
My resolution.. manually move
For clarification we need:
and not this:
|
I'm beginer with tailwind, I followed by documentation. And had same issue. |
None of the solutions here worked for me. In my case tailwindcss was installed as global package (
|
I'm getting this error when building a project with:
tailwind.config.js
:The text was updated successfully, but these errors were encountered: