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.

JavaScript heap out of memory error with the quickstart Plot example.

See original GitHub issue

I get the following error if i add a component with the quickstart <Plot/> and run npm start. I have the latest version of both react-plotly.js (2.3.0) and plotly.js (1.47.1)

`Compiling…

<— Last few GCs —>

[17798:0x2708820] 469928 ms: Mark-sweep 1302.4 (1429.6) -> 1302.3 (1429.6) MB, 2350.9 / 0.0 ms allocation failure GC in old space requested [17798:0x2708820] 472353 ms: Mark-sweep 1302.3 (1429.6) -> 1302.3 (1422.6) MB, 2425.0 / 0.0 ms last resort GC in old space requested [17798:0x2708820] 474681 ms: Mark-sweep 1302.3 (1422.6) -> 1302.3 (1421.1) MB, 2327.7 / 0.0 ms last resort GC in old space requested

<— JS stacktrace —>

==== JS stack trace =========================================

0: ExitFrame [pc: 0x32090c30427d]

Security context: 0x38b7ade206a9 <JSObject> 1: _append [/home/squeakycheese/Development/git/stockkly/node_modules/@babel/generator/lib/buffer.js:~112] [pc=0x32090ce90eef](this=0x56dca2fd981 <Buffer map = 0x1b38ed9eaad1>,str=0x3d2c8a736e69 <String[1]: >,line=48172,column=22,identifierName=0x3d2c8a702201 <null>,filename=0x3d2c8a702201 <null>,force=0x3d2c8a7022e1 <undefined>) 2: word [/home/sque…

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [node] 2: 0x876afc [node] 3: v8::Utils::ReportOOMFailure(char const*, bool) [node] 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node] 5: 0xdd42b1 [node] 6: v8::internal::Factory::NewUninitializedFixedArray(int, v8::internal::PretenureFlag) [node] 7: 0xdaf00f [node] 8: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [node] 9: 0x32090c30427d`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:27 (1 by maintainers)

github_iconTop GitHub Comments

42reactions
dhamaniasadcommented, Jun 10, 2019

Got it to work by

<script crossorigin src="https://cdn.plot.ly/plotly-latest.min.js"></script>
import createPlotlyComponent from 'react-plotly.js/factory';
const Plotly = window.Plotly;
const Plot = createPlotlyComponent(Plotly);
35reactions
squeakycheese75commented, Jun 12, 2019

I got it working using exactly the same method as dhamaniasad. So only loading in from the basic-dist.

import React from "react";
// import Plot from "react-plotly.js";
import Plotly from "plotly.js-basic-dist";

import createPlotlyComponent from "react-plotly.js/factory";
const Plot = createPlotlyComponent(Plotly);

I also installed the basic package via npm https://www.npmjs.com/package/plotly.js-basic-dist

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript heap out of memory error with the quickstart Plot example.
I get the following error if i add a component with the quickstart and run npm start . I have the latest version...
Read more >
Getting an out of memory error while using Create React App ...
JavaScript heap out of memory error with the quickstart Plot example. Javascript runs out of memory when making production build.
Read more >
How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
This error usually occurs when the default memory allocated by your system to Node. js is not enough to run a large project....
Read more >
JavaScript Heap Out Of Memory Error - OpenReplay Blog
By default, Node.js has memory limits that prevent the program from consuming too much memory and crashing the whole system. The results differ ......
Read more >
Recommendations for recovery upon Out Of Memory error
OutOfMemoryError: Java heap space error is thrown whenever the JVM reaches the heap size limit. java.lang.OutOfMemoryError: GC overhead limit exceeded. This ...
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