React-slick: error in izomorphic app (

Created on 19 Apr 2017  路  8Comments  路  Source: akiran/react-slick

/node_modules/enquire.js/src/MediaQueryDispatch.js:14
if(!window.matchMedia) {
^
ReferenceError: window is not defined

Most helpful comment

Please pin react-slick version to 0.14.7 until this is fixed.
I will fix this over weekend

All 8 comments

I'm getting the same issue. This was introduced sometime between 0.14.7 and now (0.14.10).

This is because of the new dependency on ensure.js, which cannot be used in node.

Please pin react-slick version to 0.14.7 until this is fixed.
I will fix this over weekend

thanx. We're working on a pr here. Should have it done soon.

0.14.7 still depends, 0.14.5 is safe until fix ;)

in 0.14.7 it was using react-responsive-mixin which wraps the require(enquire.js) in a check if canUseDOM which is why it worked.

Accept changes, please)))

Was this page helpful?
0 / 5 - 0 ratings