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

Local installation of postcss-cli doesn't work on Windows #5091

Closed
ericselin opened this issue Aug 17, 2018 · 5 comments

Comments

@ericselin
Copy link
Contributor

commented Aug 17, 2018

Problem

Using postcss-cli from a local node_modules folder within a project currently doesn't work on Windows. The reason is that postcss found under node_modules/postcss-cli/bin is not executable on Windows.

const localPostCSSPath = "node_modules/postcss-cli/bin/"

Proposed fix

I propose to always try to find the local installation under node_modules/.bin. This should work on other environments as well.

P.S. I'm using Hugo v0.47

@numbfall

This comment has been minimized.

Copy link

commented Oct 18, 2018

Any update on this? Or a possible work-around? Other than installing postcss-cli grobally? I am on v0.49.2

@stale

This comment has been minimized.

Copy link

commented Feb 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Feb 15, 2019

@jzeneto

This comment has been minimized.

Copy link

commented Mar 13, 2019

This still ocurrs with Hugo 0.54 in Windows 10. I agree with @ericselin that this is necessary. And since already there's a pull request, this should be put in mind.

@stale stale bot removed the Stale label Mar 13, 2019

@stale

This comment has been minimized.

Copy link

commented Jul 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Jul 11, 2019

@gesellix

This comment has been minimized.

Copy link

commented Jul 14, 2019

This occurs for me with Hugo v0.55.6/extended in windows/amd64.

Error message:

Building sites … ERROR 2019/07/14 17:35:16 error: failed to transform resource: POSTCSS: failed to transform "scss/main.css" (text/css): PostCSS not found; install with "npm install postcss-cli". See https://gohugo.io/hugo-pipes/postcss/

Contents of node_modules/.bin:

λ ls node_modules\.bin\
atob*     autoprefixer*     browserslist*     esparse*     esvalidate*     js-yaml*     postcss*     semver*     which*
atob.cmd  autoprefixer.cmd  browserslist.cmd  esparse.cmd  esvalidate.cmd  js-yaml.cmd  postcss.cmd  semver.cmd  which.cmd

Workaround:

PATH=%PATH%;%cd%\node_modules\.bin

@stale stale bot removed the Stale label Jul 14, 2019

@bep bep closed this in a5604e1 Jul 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.