Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Warning: Cannot read property 'postcss' of undefined #102

Open
mayeenulislam opened this issue Nov 30, 2016 · 1 comment
Open

Warning: Cannot read property 'postcss' of undefined #102

mayeenulislam opened this issue Nov 30, 2016 · 1 comment

Comments

@mayeenulislam
Copy link

The grunt command is breaking build with a warning. The problem started in Travis-CI and now it's displaying in local Windows install too:

Running "postcss:dist" (postcss) task
Warning: Cannot read property 'postcss' of undefined Use --force to continue.

Aborted due to warnings.
Script grunt handling the post-install-cmd event returned with error code 3

My Gruntfile.js and package.json are here

We tried solving some issues in StackOverflow, and figured out two things:

  • node version needs to be >=4
  • require('es6-promise').polyfill() is important because postcss withdrawn es6-promise support

But still it's not proceeding further. 😞
What's wrong with my process using grunt-postcss?

@Viveur
Copy link

Viveur commented Dec 22, 2017

I had this exact error.

In my case I had:
require('autoprefixer')({ browsers: ['> 1%']}).postcss

And fixed it by removing the .postcss at the end, ie:
require('autoprefixer')({ browsers: ['> 1%']})

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

2 participants