googlearchive / polyclean

BSD 3-Clause "New" or "Revised" License
20 stars 7 forks source link

Latest release is breaking vulcanize task #13

Closed markstewie closed 8 years ago

markstewie commented 8 years ago

During vulcanization of our Polymer project we get the following error.

TypeError: Cannot read property 'stripCss' of null
    at cleanCss (/Users/mark/FRONDE/LocalCover/dev/lc-web-claim-customer/node_modules/polybuild/node_modules/polyclean/index.js:150:24)

Here are the lines of code in polyclean/index.js

cleanCss: function cleanCss() {
    var stripCss = this.stripCss;
    ...

So essentially it's saying this is null.

This is breaking a production build at the moment so the sooner it's fixed the better. I'll try to work out how to patch in the mean time.

markstewie commented 8 years ago

I can see in the latest version of 1.3.0 this has been fixed with correctly referencing exports.stripCss rather than this.stripCss. When I do a npm update however I don't get this version. How can we get npm to return the latest unbroken version?

markstewie commented 8 years ago

Here is the commit that fixes the problem.. https://github.com/PolymerLabs/polyclean/commit/af55378ac44ca30417c2f8b3a527e0891aaeceec#diff-168726dbe96b3ce427e7fedce31bb0bc How can npm be updated to pull this version?

markstewie commented 8 years ago

Additionally...

When I npm install PolymerLabs/polyclean the CORRECT latest version is installed. When I npm install polyclean (as is required by polybuild package) the BROKEN version is installed.

How can this be fixed?

dfreedm commented 8 years ago

Pushed polyclean v1.3.1, which includes af55378.

markstewie commented 8 years ago

Awesome thanks!