Skip to content

Commit

Permalink
let node resolve the node_moduels path
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum committed Sep 10, 2024
1 parent 1192e00 commit cbfe10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function registerTraceModule(_module) {

// add maplibre-gl CSS here to avoid console warning on instantiation
if(bpmName === 'map') {
require('../node_modules/maplibre-gl/dist/maplibre-gl.css');
require('maplibre-gl/dist/maplibre-gl.css');
}

// if `plotly-geo-assets.js` is not included,
Expand Down

5 comments on commit cbfe10c

@ramscuse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks plotly on my project.

@birkskyum
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramscuse , I believe there's a 2.35.2 about to be published with this change, to let node resolve the file.

@archmoj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks plotly on my project.

Yes. In the mean time you may try using these builds from master: https://app.circleci.com/pipelines/github/plotly/plotly.js/11297/workflows/bdff27a6-6375-4152-8f34-e17f4bae34cb/jobs/249903/artifacts

@ramscuse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I worded this wrong. I mean to say that I need this change to get my project working again. I am coming across this error
ERROR in ./node_modules/plotly.js/src/registry.js 277:8-67
Module not found: Error: Can't resolve '../node_modules/maplibre-gl/dist/maplibre-gl.css'
How soon could could I expect to see version 2.35.2?

@archmoj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I worded this wrong. I mean to say that I need this change to get my project working again. I am coming across this error ERROR in ./node_modules/plotly.js/src/registry.js 277:8-67 Module not found: Error: Can't resolve '../node_modules/maplibre-gl/dist/maplibre-gl.css' How soon could could I expect to see version 2.35.2?

Possibly today. cc: @gvwilson

Please sign in to comment.