Skip to content
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

PostCSS with custom tailwind.config.js does not work with the -s flag #7287

Open
bep opened this issue May 18, 2020 · 3 comments
Open

PostCSS with custom tailwind.config.js does not work with the -s flag #7287

bep opened this issue May 18, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@bep
Copy link
Member

bep commented May 18, 2020

What version of Hugo are you using (hugo version)?

$ hugo version

Does this issue reproduce with the latest release?

@bep bep added the Bug label May 18, 2020
@bep bep added this to the v0.71 milestone May 18, 2020
@bep bep self-assigned this May 18, 2020
@bep bep changed the title PostCSS import resolver does not work with the -s flag PostCSS import resolver does not work with the -s flag (or something) May 18, 2020
@bep bep changed the title PostCSS import resolver does not work with the -s flag (or something) PostCSS with custom tailwind.config.js does not work with the -s flag May 18, 2020
@bep bep modified the milestones: v0.71, v0.72 May 18, 2020
@bep bep modified the milestones: v0.72, v0.73 May 31, 2020
@bep bep modified the milestones: v0.73, v0.74 Jun 23, 2020
@bep bep modified the milestones: v0.74, v0.75 Jul 13, 2020
@bep bep modified the milestones: v0.75, v0.76 Sep 14, 2020
@bep bep modified the milestones: v0.76, v0.77 Oct 6, 2020
@bep bep modified the milestones: v0.77, v0.78 Oct 30, 2020
@davidejones
Copy link
Contributor

I just had a similar issue using postcss and csspurge. Site structure like this

/node_modules/
/src/
  assets/
  config/
  content/
  layouts/
  postcss.config.js
package.json

Running the command hugo -s src on windows worked fine but I was banging my head against a wall running the same command during a linux github action where it was failing every time with

Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "css/css/bundle.css_b1dae1e6a06c812cd4bcab1cb0e84658" not found in file cache

It was the same files, same node version, same hugo version with the exception of being linux. I found switching to a bash prompt (MINGW64) on windows I could recreate the issue. As a quick fix I copied the /node_modules/ to the src/ dir and it worked fine again both in the action and bash.

I'm wondering if the code here should lookup project node_modules then node_modules inside current working dir when running hugo binary and then fallback to the cache like it does now?

@bep
Copy link
Member Author

bep commented Nov 14, 2020

I'm wondering if the code here should lookup project node_modules

My memory is a little shady, but I don't think the (primary) problem is finding the binary. This is an issue even if you install PostCSS CLI globally,

@bep bep modified the milestones: v0.78, v0.83 Apr 23, 2021
@bep bep modified the milestones: v0.83, v0.84 May 3, 2021
@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants