Skip to content

Dist versions do not work with Browserify #2902

Closed
@m90

Description

@m90

This is picking up: plotly/react-plotly.js#93

I'm running into issues using the dist versions included in plotly.js and plotly.js-dist in a Browserify bundle.

I am basically just doing what the README tells me:

var Plotly = require('plotly.js-dist');

console.log(Plotly);

When I try to Browserify this script it tells me:

Error: Cannot find module '../src/transforms/aggregate' from '/home/frederik/projects/plotly-browserify-issue/node_modules/plotly.js-dist'

When I try to load the dist bundle from the plotly.js package as seen for example in react-plotly.js I will see the following error:

Error: Cannot find module './core' from '/home/frederik/projects/plotly-browserify-issue/node_modules/plotly.js/dist'

I can however bundle plotly if I use require('plotly.js') as the main entry point.

I created an example repository for reproducing the issue over here: https://github.com/m90/plotly-browserify-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions