question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceError: requestAnimationFrame is not defined

See original GitHub issue

Where exactly do you put

if(!Highcharts){
  global.highcharts = require('react-highcharts/src/fakeHighcharts.js');
}

for node rendering? I have tried several different ways but I am not having any luck. Is there a complete example of this? Thanks in advanced.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
kirjscommented, Jun 28, 2016

Should be fixed in 8.4.1, feel free to reopen if not

0reactions
chevin99commented, Jun 27, 2016

Browser: Chrome Version 51.0.2704.103 (64-bit) react-highcharts version 8.3.3

There error is just Uncaught TypeError: Cannot read property 'requestAnimationFrame' of undefined

I believe the problem is line 33 in chartsFactory.jsx:

global.requestAnimationFrame && requestAnimationFrame(()=>{

global isn’t defined in the browser. If I update the code to have global default to window the error goes away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

requestAnimationFrame is not defined · Issue #974 · vuejs/vue ...
The issue is that jsdom-global doesn't add requestAnimationFrame to the global object. The immediate fix is to add requestAnimationFrame to the ...
Read more >
requestAnimationFrame is not defined it Next.js with React ...
The problem is in the missed RequestAnimationFrame functionality at the server. This error happens when Next.js tries to render the ...
Read more >
What is the best solution to solve requestAnimationFrame is ...
The requestAnimationFrame is not defined” is an Angular universal server running issue. The best solution for this issue is to search for ...
Read more >
ReferenceError: requestAnimationFrame is not defined
I have just updated to 2.9.10 and now get this error when running tests in Jest. ReferenceError: requestAnimationFrame is not defined at ...
Read more >
requestAnimationFrame is not defined' in Vuetify unit test ...
Coding example for the question How to fix 'ReferenceError: requestAnimationFrame is not defined' in Vuetify unit test-vuetify.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found