Autoprefixer in npm script not working important!

packge.json file

  "name": "mir",
  "version": "1.0.0",
  "description": "\"\"\u001b[Da website for a company\"",
  "main": "index.js",
  "scripts": {
    "purge:bs": "purgecss --css node_modules/bootstrap/dist/css/bootstrap.css --content *.html *.js -o 1-css",
    "watch:sass": "node-sass 2-sass/styles.scss 1-css/styles.css -w",
    "compile:sass": "node-sass 2-sass/styles.scss 1-css/styles.comp.css",
    "prefix:css": "postcss --use autoprefixer -b 'last 10 versions' 1-css/styles.comp.css -o 1-css/styles.prefix.css",
    "concat:css": "concat -o 1-css/styles.concat.css 1-css/bootstrap.css 1-css/styles.comp.css",
    "compress:css": "node-sass 1-css/styles.concat.css 1-css/styles.min.css --output-style compressed",
    "build:css": "npm-run-all purge:bs compile:sass concat:css compress:css"
  "devDependencies": {
    "autoprefixer": "^9.1.5",
    "concat": "^1.0.3",
    "node-sass": "^4.9.3",
    "npm-run-all": "^4.1.3",
    "postcss-cli": "^6.0.0",
    "purgecss": "^1.1.0"


$ npm run prefix:css

> mir@1.0.0 prefix:css C:\Users\Yousefs_Dator\desktop\mir
> postcss --use autoprefixer -b 'last 10 versions' 1-css/styles.comp.css -o 1-cs                                                                                            s/styles.prefix.css

TypeError: Patterns must be a string or an array of strings
    at assertPatternsInput (C:\Users\Yousefs_Dator\Desktop\mir\node_modules\glob                                                                                            by\index.js:14:9)
    at generateGlobTasks (C:\Users\Yousefs_Dator\Desktop\mir\node_modules\globby                                                                                            \index.js:20:2)
    at module.exports (C:\Users\Yousefs_Dator\Desktop\mir\node_modules\globby\in                                                                                            dex.js:67:15)
    at Promise.resolve.then (C:\Users\Yousefs_Dator\Desktop\mir\node_modules\pos                                                                                            tcss-cli\index.js:53:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
npm ERR! errno 1
npm ERR! mir@1.0.0 prefix:css: `postcss --use autoprefixer -b 'last 10 versions'                                                                                             1-css/styles.comp.css -o 1-css/styles.prefix.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mir@1.0.0 prefix:css script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                            ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Yousefs_Dator\AppData\Roaming\npm-cache\_logs\2018-10-06T0                                                                                            6_26_42_713Z-debug.log

I’m having the same issue. Autoprefixer adds prefixes only on min- and max-content grid values, like it does not identifies last 10 version command or something. And I do not have any errors, it is propaply because I wrapped this statement into slashes as follows :\"last 10 versions\".

I have the same problem, and I cant find a solution to it. Please post your solution, if you found it

Hi, Ali unfortunately i did not find a solution i think it is a bug so i just skipped this part.
I also think you should report it as bug for the manufactures if you can not fixed by yourself.

this work with me right
postcss --use autoprefixer -b “last 10 versions” css/style.concat.css -o css/style.prefix.css"

I wonder what kind of system you are using? Heard that people with macs don’t have this kind of problem and there’s no go-around on windows. Been pulling my hair out now for the past few hours.

This problem is solved this way :

“prefix-css”: “postcss css/style.concat.css --use=autoprefixer --map=false

in package.json write :
“browserslist”: [“last 5 versions”]