Questions tagged [postcss-cli]

18 questions
4
votes
1 answer

cannot find module styles.css with postcss

I am following this example for a quick intro to postcss: https://www.sitepoint.com/an-introduction-to-postcss/ After installing postcss and autoprefixer globally, creating a styles.css file in the root of my project and running the following…
HGB
  • 2,157
  • 8
  • 43
  • 74
2
votes
1 answer

Error: Please install PostCSS 8 or above. how can I fix this?

Here is my package.json file.how can I solve this issue?. I tried to change the version of autoprefixer to 9.8.6 but it didn't work. Please help me with this issue { "name": "react-tailwindcss", "version": "0.1.0", "private": true, …
2
votes
1 answer

Minify multiple input file with postcss

I installed cssnano following these step: http://cssnano.co/guides/getting-started/ Into the root of my project i ran: npm install cssnano --save-dev After i installed postcss-cli: npm install postcss-cli --global Finally i created…
bobc82
  • 497
  • 7
  • 17
2
votes
1 answer

postcss-base64 plugin not working with postcss-cli

In my global.css I have inlined svg's, like this: .icon-generated-list { background-image: url("data:image/svg+xml;charset=utf-8,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg class='icon-generated-list' width='14px' height='14px' viewBox='0 0…
1
vote
0 answers

map: ctx.file.dirname.includes('examples')?

I'm currently building a website using understrap themes. now in the postcss.config.js file I want to know what is this code use for. map: ctx.file.dirname.includes('examples') ?. Here is the actual code 'use strict' module.exports = ctx => { …
1
vote
0 answers

postcss-cli: override the output file extensions

I want it to process .dev.css files and output the result in the same folder but only with the .css extension. Expected result: src login.dev.css <-- input file login.css <-- output file I'm using postcss-cli like this: postcss src/**/*.dev.css…
adesurirey
  • 2,549
  • 2
  • 16
  • 36
1
vote
1 answer

React Tailwind - Not able to run build.css file

I am new to tailwind I have a simple react shopping cart project with basic CSS and I want to convert it with Tailwind. I have install tailwind using the tutorial below. https://www.youtube.com/watch?v=v6Sy6VP2yOc But I am stuck when in tutorial he…
Owaiz Yusufi
  • 849
  • 1
  • 14
  • 34
1
vote
0 answers

Logging what plugins PostCSS is running with?

I'm writing a CLI that uses PostCSS and even though I don't have uncss in the plugins array, I'm getting error reports from uncss. Is there a way to have PostCSS print out what plugins are currently loaded? This issue is related to this issue.
Ole
  • 41,793
  • 59
  • 191
  • 359
1
vote
0 answers

PostCSS modules are loading from the wrong directory

I'm trying to get PostCSS CLI to work on Windows, to use with PHPStorm. I've got it working via command line options, but I want to use it with the javascript config file. Here are the commands I used to install PostCSS through NPM: # NPM is…
Radley Sustaire
  • 3,382
  • 9
  • 37
  • 48
1
vote
4 answers

Autoprefixer errors with NPM (✖ Plugin Error: Cannot find module )

So currently I am having troubles with autoprefixer. I have downloaded postcss-cli and autoprefixer to --save-dev and -g When I run a command like this: postcss ../../../htdocs/css/workflow/homepage-announcements.css -o…
T Krett
  • 59
  • 1
  • 1
  • 8
0
votes
0 answers

PostCSS + CRA + Sass

I just learned about PostCSS while looking for a way to polyfill a React application created using create-react-app. The styling of this application is in .scss files, not the regular .css files. I've been trying to follow this tutorial but it's…
0
votes
0 answers

How can i generate minified CSS files in same directory with PostCSS

I would like to use PostCSS to generate minified CSS files in a same directory with "min" keyword. I have various CSS files and each file should be minify and add a ".min" along with their file names. Following is the structure. From the…
0
votes
1 answer

''postcss' is not recognized as an internal or external command, operable program or batch file

Even though I have postcss installed I still get the above error in the terminal when I try to build. I'm using this in conjunction with tailwindcss and my postcss.config.js file looks like this: module.exports = { plugins: [ …
0
votes
0 answers

How to use PostCSS autoprefixer through PostCSS-cli?

I came across the PostCSS autoprefixer docs, I didn't get what arguments to pass with. Input File path --use use autoprefixer -d Output CSS path npx postcss ./assets/styles.css -- use autoprefixer -d build The docs didn't make…
RoCkDevstack
  • 3,517
  • 7
  • 34
  • 56
0
votes
1 answer

postcss -u autoprefixer Error: Unsupported source map encoding charset=utf-8

I am getting Unsupported source map encoding charset=utf-8 for angular build, while using postcss -u autoprefixer to my angular js project. Please suggest me, what might be the issue. Using postcss-cli: 2.4.0 version
gautham
  • 87
  • 2
  • 12
1
2