plotly / plotly/angular-plotly.js

Angular 19 specs won't run

Open
#278 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
242
Forks
81
Avg merge
8h 48m
Merged PRs (30d)
18

Description

When using this library in an Angular 19 application, I'm having an issue running my test suite. None of the tests run due to the following:

✔ Browser application bundle generation complete.

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-array' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-collection' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-dispatch' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-geo' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-path' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-quadtree' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-shape' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-time' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'd3-timer' in '.../node_modules/plotly.js-dist-min'

./node_modules/plotly.js-dist-min/plotly.min.js - Error: Module not found: Error: Can't resolve 'elementary-circuits-directed-graph' in '.../node_modules/plotly.js-dist-min'

I'm not sure how to diagnose this and the plotly.js github doesn't show any issues like this in their repository. Could I get some help getting pointed in the right direction on diagnosing the issue here and overcoming it?

For what it is worth, the plots work great when serving the application, so I'm hopeful that there is something I need to do to get my specs running again.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Angular 19 test suite failure and inspect the module-resolution errors reported for node_modules/plotly.js-dist-min/plotly.min.js. Compare the test build with the serving build, then confirm that the missing dependencies are resolved and the specs run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.