Chatmosphere / chatmosphere-app

We are a small group of friendly humans working on an open source project to make informal video calls more fun and dynamic.
https://chatmosphere.cc/
Other
161 stars 40 forks source link

`npm install` fails #192

Open niklasfi opened 1 year ago

niklasfi commented 1 year ago

Describe the bug Both npm install and npm ci fail with a resolver error.

To Reproduce Actually I was trying to create a dockerfile for the project, so here is the dockerfile that can be used to reproduce the problem:

from docker.io/library/alpine:latest as git

run apk add git
run git clone https://github.com/Chatmosphere/chatmosphere-app.git /opt/chatmosphere-app

from docker.io/library/node:lts-slim as run
copy --from=git /opt/chatmosphere-app /opt/chatmosphere-app

workdir /opt/chatmosphere-app
run npm install
entrypoint ["npm","start"]

Expected behavior As described in the install file I was expecting npm to download all relevant dependencies.

Observed behavior npm install fails with the following log:

[2/2] STEP 4/5: run npm install
npm notice
npm notice New major version of npm available! 9.8.1 -> 10.2.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.1>
npm notice Run `npm install -g npm@10.2.1` to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-zoom-pan-pinch@1.6.1
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@"*" from @testing-library/react@12.1.2
npm ERR!   node_modules/@testing-library/react
npm ERR!     @testing-library/react@"^12.0.0" from the root project
npm ERR!   12 more (@testing-library/react-hooks, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0" from react-zoom-pan-pinch@1.6.1
npm ERR! node_modules/react-zoom-pan-pinch
npm ERR!   react-zoom-pan-pinch@"^1.6.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^15.0.0 || ^16.0.0" from react-zoom-pan-pinch@1.6.1
npm ERR!   node_modules/react-zoom-pan-pinch
npm ERR!     react-zoom-pan-pinch@"^1.6.1" 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!
npm ERR! For a full report see:
npm ERR! /root/.npm/_logs/2023-10-18T21_20_42_100Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-18T21_20_42_100Z-debug-0.log
Error: building at STEP "RUN npm install": while running runtime: exit status 1

I haved attached the mentioned log files here: