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

‘TypeError: window.matchMedia is not a function’ error #141

Open
dobaor opened this issue Jul 9, 2022 · 1 comment
Open

‘TypeError: window.matchMedia is not a function’ error #141

dobaor opened this issue Jul 9, 2022 · 1 comment

Comments

@dobaor
Copy link

dobaor commented Jul 9, 2022

I have to say: this tool is real helpful for me, THANKS!
But when I 'run npm build', I got error like this: ‘TypeError: window.matchMedia is not a function’
Anyone else ever met this error and fixed it?

@krazylearner
Copy link

I am getting same error

🕷 Starting crawling http://localhost:50045/
Error: Uncaught [Error: matchMedia not present, legacy browsers require a polyfill]
at reportException (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\living\helpers\runtime-script-errors.js:58:24)
at processJavaScript (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:130:7)
at HTMLScriptElementImpl._eval (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\living\nodes\HTMLScriptElement-impl.js:65:7)
at C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:31:22
at Object.check (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:89:11)
at C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\living\nodes\Document-impl.js:108:12
at wrappedEnqueued (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:255:16)
at Request._callback (C:\projects\kashish-react\node_modules\react-snapshot\node_modules\jsdom\lib\jsdom\browser\resource-loader.js:203:9)
at self.callback (C:\projects\kashish-react\node_modules\request\request.js:185:22)
at Request.emit (node:events:513:28) Error: matchMedia not present, legacy browsers require a polyfill
at new s (http://localhost:50045/static/js/main.b957b6b8.js:2:215213)
at 8153 (http://localhost:50045/static/js/main.b957b6b8.js:2:216491)
at n (http://localhost:50045/static/js/main.b957b6b8.js:2:728903)
at 3178 (http://localhost:50045/static/js/main.b957b6b8.js:2:571166)
at n (http://localhost:50045/static/js/main.b957b6b8.js:2:728903)
at 5717 (http://localhost:50045/static/js/main.b957b6b8.js:2:551492)
at n (http://localhost:50045/static/js/main.b957b6b8.js:2:728903)
at http://localhost:50045/static/js/main.b957b6b8.js:2:892836
at http://localhost:50045/static/js/main.b957b6b8.js:2:939735
at http://localhost:50045/static/js/main.b957b6b8.js:2:939738
🔥 'render' from react-snapshot was never called. Did you replace the call to ReactDOM.render()?
🕸 Finished crawling.

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

2 participants