yocontra/react-responsive

react-responsive self is not defined

sinapirani opened this issue ยท 8 comments

when i import react-responsive package as (import MediaQuery from 'react-responsive)
the page not working and showing an error as (self is not defined)

Same here after update into 9.0.0-beta.7

Same here. It happen recently. I've already used react-responsive a long time ago and it's always fine. But 5 hour ago, my apps build pipeline failed because react-responsive self is not defined.

Any solution?

image

Seems to be related on the upgrade made on webpack. Made a PR attempting to fix it

Seems to be related on the upgrade made on webpack. Made a PR attempting to fix it

thank you man. how to fix that issue in nextjs?

Seems to be related on the upgrade made on webpack. Made a PR attempting to fix it

thank you man. how to fix that issue in nextjs?

Solved with revert to version 8.2.0 ๐Ÿ‘

thank you man. how to fix that issue in nextjs?

I temporary solved reverting into v9.0.0-beta.6

Issue was introduced in 9.0.0-beta7 - can you try 9.0.0-beta8 and let me know if it solves it?

Also FWIW - with these beta releases, please pin to a specific version - they are iterated on rapidly and aren't always stable. Hoping to have a 9.0 stable out soon if everyone verifies this is working for them for a week or so.

v9.0.0-beta8 works ok on my end, thank you!