Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 19 specs won't run #278

Open
jakehockey10 opened this issue Feb 7, 2025 · 2 comments
Open

Angular 19 specs won't run #278

jakehockey10 opened this issue Feb 7, 2025 · 2 comments

Comments

@jakehockey10
Copy link

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.

@jakehockey10
Copy link
Author

This seems to be an issue with the recently released 3.0.0 (10 days ago) of plotly.js-dist-min. Unfortunately, this library doesn't seem compatible with that major version upgrade, so the current instructions to install this npm package might need to specify that we need to stick with version 2 to at least have the spec be able to run. Still not sure why there are no issues when serving the app itself. I didn't want to create a PR to update the README because I didn't actually know much about the nature of the cause of this issue.

@losciur
Copy link

losciur commented Feb 15, 2025

same issues for me running with Angular 19...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants