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

"npm start" get error #233

Closed
ilovefafa opened this issue Sep 9, 2018 · 3 comments
Closed

"npm start" get error #233

ilovefafa opened this issue Sep 9, 2018 · 3 comments

Comments

@ilovefafa
Copy link

ilovefafa commented Sep 9, 2018

step:

  1. npm install
  2. npm start
  3. get the following error.

the main error is TypeError: Patterns must be a string or an array of string,i think is the postcss error,and i find postcss-cli issuse said that it doesnt't have an option 'b'?i don't understand.

PS C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master> npm start

> react-toastify@4.3.0 start C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master
> npm run sass && webpack-dev-server --config ./webpack.config.dev.js


> react-toastify@4.3.0 sass C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master
> node-sass scss/main.scss dist/ReactToastify.css

Rendering Complete, saving .css file...
Wrote CSS to C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master\dist\ReactToastify.css

> react-toastify@4.3.0 postsass C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master
> postcss --use autoprefixer -m -b 'last 2 versions' dist/ReactToastify.css -o dist/ReactToastify.css

TypeError: Patterns must be a string or an array of strings
    at assertPatternsInput (C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master\node_modules\postcss-cli\node_modules\globby\index.js:14:9)
    at generateGlobTasks (C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master\node_modules\postcss-cli\node_modules\globby\index.js:20:2)
    at module.exports (C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master\node_modules\postcss-cli\node_modules\globby\index.js:67:15)
    at Promise.resolve.then (C:\Users\Administrator\Desktop\github-items\1-MyItems\react-ele-imitation\src\react-toastify-master\node_modules\postcss-cli\index.js:53: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
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-toastify@4.3.0 postsass: `postcss --use autoprefixer -m -b 'last 2 versions' dist/ReactToastify.css -o dist/ReactToastify.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-toastify@4.3.0 postsass script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-09-09T13_47_21_653Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-toastify@4.3.0 start: `npm run sass && webpack-dev-server --config ./webpack.config.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-toastify@4.3.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-09-09T13_47_21_701Z-debug.log

thanks for answering my questions.

fkhadra added a commit that referenced this issue Sep 9, 2018
fkhadra added a commit that referenced this issue Sep 9, 2018
@fkhadra
Copy link
Owner

fkhadra commented Sep 9, 2018

Hey @ilovefafa,

I checked the source of postcss-cli and indeed the option -b doesn't exist.
I don't know why on linux or osx(the main os I work with) I didn't had the issue. Anyway, I fixed the issue by publishing a new release. Thanks for sharing the error.

@fkhadra fkhadra closed this as completed Sep 9, 2018
@rayjencode
Copy link

i replace -b to -m still error exist x.x

@BlazFin
Copy link

BlazFin commented Dec 30, 2018

The only way it worked for me on Windows:
postcss --use autoprefixer -m \"last 10 versions\" css/style.concat.css -o css/style.prefix.css

PostCSS CLI - does not have -b function at all. I don't know how or why it works on mac.
https://www.npmjs.com/package/postcss-cli

vasiliydolmatov pushed a commit to vasiliydolmatov/react-toastify that referenced this issue Apr 2, 2019
vasiliydolmatov pushed a commit to vasiliydolmatov/react-toastify that referenced this issue Apr 2, 2019
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

4 participants