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

Missing NODE_PATH lets PostCSS fail because it cannot find global modules #4

Open
moritzheiber opened this issue Jan 29, 2021 · 0 comments

Comments

@moritzheiber
Copy link

moritzheiber commented Jan 29, 2021

postcss, postcss-cli and autoprefixer are globally installed modules. Unfortunately, if the theme has a "local" postcss.config.js (e.g. like the docsy theme) npm fails to resolve the global module path and therefore thinks the autoprefixer module is missing.

Adding NODE_PATH to the execution run for a relevant GitHub Action fixes the problem (reference, example).

I would suggest adding echo `npm root -g` >> /etc/profile somewhere inside the Dockerfile for the primary container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant