plotly.js: Missing ndarray dependencies using plotly.js v2.5.0, npm v6 and react-plotly.js v1

When reviewing our weekly Dependabot updates I came across an issue with our migration from Plotly 2.4.1 to 2.5.0. We now get the error shown below when trying to install dependencies. The issue was shown in our CI pipeline which runs npm ci.

image

I’ve attached our package files from 2.4.1 which work fine and the updated ones from 2.5.0 which break. You can run npm ci with the 2.5.0 files to reproduce.

error.zip

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 40 (20 by maintainers)

Most upvoted comments

@archmoj I’ve forked my own version of your branch and removed src from npmignore. I can now confirm that your PR is working as expected with npm version 6.

Unfortunately this week we may not be able to allocate more time investigating this problem. But please let us know if you found a solution for this namely at the react-plotly.js level.

@archmoj I understand your point but I think we should still make an effort to figure out what’s going on here. If it’s just a matter of npm6 not recognizing the link format we’re using it’ll be a simple fix. If it requires us to give all these forked packages different names (@plotly/ndarray etc) then that may be a bigger lift but perhaps a cleaner representation of what we’re doing anyway.

BTW one thing I notice, not sure if this has anything to do with the error, but the repository field in our ndarray fork points to the original repo, not our own.