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 · 6 comments
Closed

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

ericselin opened this issue Aug 17, 2018 · 6 comments
Labels

Comments

@ericselin
Copy link
Contributor

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

@ukhwaja
Copy link

ukhwaja 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
Copy link

stale bot 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
@josineto
Copy link

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
Copy link

stale bot 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
Copy link

gesellix 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 as completed in a5604e1 Jul 16, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants