pnnl / ExaGO

High-performance power grid optimization for stochastic, security-constrained, and multi-period ACOPF problems.
Other
60 stars 9 forks source link

conflicting visualization dependencies ExaGO/viz/package.json #129

Closed nedpfeiffer closed 3 months ago

nedpfeiffer commented 3 months ago

Issue type

Relates to

Summary

If this is a non-issue, as ExaGo's visualization is still experimental, feel free to close this issue.

When I attempt to install ExaGO's visualization, there are conflicting dependencies and the installation fails.

Exact commands to reproduce, if applicable

ubuntu@workstation:~$ cd ExaGO/viz/
ubuntu@workstation:~/ExaGO/viz$ nvm use 16.13.0
Now using node v16.13.0 (npm v8.1.0)
ubuntu@workstation:~/ExaGO/viz$ npm install
npm notice 
npm notice New major version of npm available! 8.1.0 -> 10.5.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
npm notice Run npm install -g npm@10.5.0 to update!
npm notice 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: geojson@0.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from react-chat-widget@3.1.4
npm ERR! node_modules/react-chat-widget
npm ERR!   react-chat-widget@"^3.1.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/ubuntu/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2024-03-20T14_46_28_716Z-debug.log
ubuntu@workstation:~/ExaGO/viz$ node -v
v16.13.0
ubuntu@workstation:~/ExaGO/viz$ npm -v
8.1.0
ubuntu@workstation:~/ExaGO/viz$ nvm -v
0.39.7

Possible fixes, if applicable

Using --legacy-peer-deps allows for a successful installation, but might lead to runtime issues if the conflicting packages are not actually compatible with each other.

ubuntu@workstation:~/ExaGO/viz$ npm install --legacy-peer-deps
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'langchain@0.0.75',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@fortaine/fetch-event-source@3.0.6',
npm WARN EBADENGINE   required: { node: '>=16.15' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'lru-cache@10.2.0',
npm WARN EBADENGINE   required: { node: '14 || >=16.14' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN deprecated figgy-pudding@3.5.2: This module is no longer supported.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated @types/classnames@2.3.1: This is a stub types definition. classnames provides its own type definitions, so you do not need this installed.
npm WARN deprecated tilebelt@1.0.1: This module is now under the @mapbox namespace: install @mapbox/tilebelt instead
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated expression-eval@2.1.0: The expression-eval npm package is no longer maintained. The package was originally published as part of a now-completed personal project, and I do not have incentives to continue maintenance.
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1462 packages, and audited 1463 packages in 1m

106 packages are looking for funding
  run `npm fund` for details

16 vulnerabilities (1 low, 6 moderate, 9 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Again, feel free to close the issue as using --legacy-peer-deps seemingly works fine. If that's the case, it may be worth noting in the documentation at ExaGO/viz/README.md.

Thanks!

abhyshr commented 3 months ago

I've seen these errors before. Are you able to launch the visualization?

nedpfeiffer commented 3 months ago

Yes, the visualization launches successfully using npm install --legacy-peer-deps then npm start

cameronrutherford commented 3 months ago

https://github.com/pnnl/ExaGO/blob/develop/docs/devcontainer/viz-tutorial.ipynb - I didn't need --legacy-peer-deps when installing things in a devcontainer, but there were certainly a few issues when I was first iteration. Note that the notebook references an older version of the Dockerfile https://github.com/pnnl/ExaGO/blob/develop/.devcontainer/Dockerfile

I support updating our docs to include this recommendation for install flags... Even though our viz is experimental, it should work :)

abhyshr commented 3 months ago

@cameronrutherford Can you update the docs and include a note on --legacy-peer-deps?