SemanticComputing / sampo-ui

Sampo-UI – A framework for building user interfaces for semantic portals
https://seco.cs.aalto.fi/tools/sampo-ui
MIT License
33 stars 7 forks source link

npm error ERESOLVE react #59

Open SvenLieber opened 5 months ago

SvenLieber commented 5 months ago

Hello,

I try to install SAMPO-UI via npm on a server where I unfortunately cannot install Docker (not allowed by the ICT department). I am using the most recent version of nodejs (v18.20.0) and npm (v10.5.0).

When executing npm install I get the error shown below (I get the same error when using the older node version 16.20 which is closer to the one described in your Dockerfile, the version I get when downloading node via curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh).

It seems that some dependencies cannot be resolved. I never really worked with react, so I am not sure how to fix the issue without breaking other dependencies.

Do you have any idea how I can fix this issue?

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @nosferatu500/react-dnd-scrollzone@1.0.14
npm WARN Found: react-dnd@14.0.5
npm WARN node_modules/react-dnd
npm WARN   react-dnd@"^14.0.2" from @nosferatu500/react-sortable-tree@3.0.6
npm WARN   node_modules/@nosferatu500/react-sortable-tree
npm WARN     @nosferatu500/react-sortable-tree@"^3.0.5" from the root project
npm WARN     1 more (react-sortable-tree-theme-file-explorer)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dnd@"^11.1.3" from @nosferatu500/react-dnd-scrollzone@1.0.14
npm WARN node_modules/@nosferatu500/react-dnd-scrollzone
npm WARN   @nosferatu500/react-dnd-scrollzone@"^1.0.14" from @nosferatu500/react-sortable-tree@3.0.6
npm WARN   node_modules/@nosferatu500/react-sortable-tree
npm WARN 
npm WARN Conflicting peer dependency: react-dnd@11.1.3
npm WARN node_modules/react-dnd
npm WARN   peer react-dnd@"^11.1.3" from @nosferatu500/react-dnd-scrollzone@1.0.14
npm WARN   node_modules/@nosferatu500/react-dnd-scrollzone
npm WARN     @nosferatu500/react-dnd-scrollzone@"^1.0.14" from @nosferatu500/react-sortable-tree@3.0.6
npm WARN     node_modules/@nosferatu500/react-sortable-tree
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-html-parser@2.0.2
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@">=16.3" from @deck.gl/react@8.6.5
npm ERR!   node_modules/@deck.gl/react
npm ERR!     @deck.gl/react@"8.6.5" from deck.gl@8.6.5
npm ERR!     node_modules/deck.gl
npm ERR!       deck.gl@"^8.6.0" from the root project
npm ERR!   33 more (@emotion/react, @emotion/styled, @mui/base, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0-0" from react-html-parser@2.0.2
npm ERR! node_modules/react-html-parser
npm ERR!   react-html-parser@"^2.0.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0-0" from react-html-parser@2.0.2
npm ERR!   node_modules/react-html-parser
npm ERR!     react-html-parser@"^2.0.2" 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! 
HeikkiR commented 5 months ago

Hi! Unfortunately currently Sampo-UI only runs on the Node version 16.13.0. I would recommend you to use Node Version Manager (nvm) that allows you to easily change Node version.

SvenLieber commented 5 months ago

Thank you, when using nvm I was able to install the application without errors!

The next problem I face is that the application will run behind a reverse proxy so I have to adapt the webpack configuration to avoid the error Invalid Host Header, but this seems to be a general issue with webpack, so out of the scope of SAMPO-UI.