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.

Can't resolve 'plotly.js/dist/plotly'

See original GitHub issue

I get the following error when I start my react app.

./node_modules/react-plotly.js/react-plotly.js
Module not found: Can't resolve 'plotly.js/dist/plotly'

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

9reactions
bluprince13commented, May 18, 2019

I just had to install plotly.

npm install plotly.js

Shouldn’t it be installed automatically if it is a dependancy?

3reactions
oephcommented, Mar 2, 2020

I’m currently using this with plotly.js-dist. You can just use the factory.js with your own plotly dist.

import plotComponentFactory from "react-plotly.js/factory";
import Plotly from "plotly.js-dist";

const PlotComponent = plotComponentFactory(Plotly);

export default PlotComponent;

CodeSandbox link: https://codesandbox.io/s/fancy-smoke-9jlm3?fontsize=14&hidenavigation=1&theme=dark

Read more comments on GitHub >

github_iconTop Results From Across the Web

plotly.js-dist - npm
Start using plotly.js-dist in your project by running `npm i plotly.js-dist`. There are 34 other projects in the npm registry using ...
Read more >
Docker - Module not found: Can't resolve 'react-plotly.js'
1 Answer 1 · Stop any docker-compose if running, with docker-compose down -v · Now add your npm module in your react application,...
Read more >
React-plotly not working with create-react-app: UPDATE
I made a create-react-app using two node versions on Windows 10. ... import Plot from 'react-plotly.js';. and start the app with npm start...
Read more >
plotly.js-basic-dist | Yarn - Package Manager
js -basic-dist. Ready-to-use plotly.js basic distributed bundle. Contains trace modules bar , pie and scatter .
Read more >
A Plotly.js React Component From Plotly - Morioh
import React from 'react'; import Plot from 'react-plotly.js'; class App extends React.Component { render() { return ( <Plot data={[ { x: [1, 2,...
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