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

use exactly version 5.0.5 of vis-util #1109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ryan1729
Copy link

@Ryan1729 Ryan1729 commented Sep 6, 2024

As mentioned in this comment on #1064, the upstream package vis-util has removed the add/remove event listeners API in visjs/vis-util#1417, in version 5.0.6 specifically.

This causes errors to be displayed in the console when the user lets go of the mouse button after dragging the graph, including in the official examples.

Uncaught TypeError: (void 0) is not a function

This PR changes the package.json to use exactly 5.0.5 of vis-util; the newest version before the removal of the listeners API.

With this change, npm install unfortunately prints this resolution error:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/component-emitter
npm error   dev component-emitter@"2.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer component-emitter@"^1.3.0" from [email protected]
npm error node_modules/vis-util
npm error   dev vis-util@"5.0.5" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Running npm install --force overrides this and allows the installation to complete.

After that, doing a build produces a vis-graph3d.min.js file that doesn't produce that Uncaught TypeError anymore.

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

Successfully merging this pull request may close these issues.

1 participant