Skip to content

Error: Can't resolve 'tailwindcss' in '/path/../@import 'tailwindcss'; #16097

Answered by wongjn
virtuallyunknown asked this question in Help
Discussion options

You must be logged in to vote

from and base should be file paths, not file content:

 const res = await postcss([
     tailwindPostcss({
-        base: baseFile,
+        base __dirname,
          optimize: false
     })
-]).process(baseFile, { from: baseFile, to: './out/index.css' });
+]).process(baseFile, { from: './src/tailwind.css', to: './out/index.css' });

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@virtuallyunknown
Comment options

@wongjn
Comment options

wongjn Jan 31, 2025
Collaborator

@virtuallyunknown
Comment options

Answer selected by virtuallyunknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants