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

TypeError: Patterns must be a string or an array of strings #212

Closed
bluedusk opened this issue May 1, 2018 · 3 comments
Closed

TypeError: Patterns must be a string or an array of strings #212

bluedusk opened this issue May 1, 2018 · 3 comments

Comments

@bluedusk
Copy link

bluedusk commented May 1, 2018

Got this error:

TypeError: Patterns must be a string or an array of strings

Error Message Detail:

TypeError: Patterns must be a string or an array of strings
    at assertPatternsInput (D:\WorkSpace\CSS\css_advance_course\Natours\starter\node_modules\globby\index.js:15:9)
    at generateGlobTasks (D:\WorkSpace\CSS\css_advance_course\Natours\starter\node_modules\globby\index.js:21:2)
    at module.exports (D:\WorkSpace\CSS\css_advance_course\Natours\starter\node_modules\globby\index.js:73:15)
    at Promise.resolve.then (D:\WorkSpace\CSS\css_advance_course\Natours\starter\node_modules\postcss-cli\index.js:55:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

When I try to run this with npm script:

"postcss --use autoprefixer -b 'last 10 versions' input.css -o output.css"

System Environment:

System: Win7 64
Node: v8.11.1
NPM: 5.6.0
"autoprefixer": "^8.4.1",
"postcss-cli": "^5.0.0"
@RyanZim
Copy link
Collaborator

RyanZim commented May 1, 2018

postcss-cli doesn't have an option -b; you'll want to either use a config file, or keep your browserslist config in your package.json

@rdhammack88
Copy link

For those of you still having this problem and are using windows, try this link as it worked for me.
Answer. Basically, instead of using single quotes, use double quotes around the "last 10 versions" and escape the quotes.

@mdrsahal
Copy link

mdrsahal commented May 9, 2019

For those of you still having this problem and are using windows, try this link as it worked for me.
Answer. Basically, instead of using single quotes, use double quotes around the "last 10 versions" and escape the quotes.

it worked. thank you.

@postcss postcss locked as resolved and limited conversation to collaborators May 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants