Just-Moh-it / Pckd

The ⚡️ analytics-intensive, self-hostable link-shortener with a beautiful UI | AKA free bit.ly alternative 🚀
https://docs.pckd.me/
MIT License
788 stars 95 forks source link

Docker build error #68

Open MinistrBob opened 2 years ago

MinistrBob commented 2 years ago

Server doesn't build.

$ docker-compose up

Sending build context to Docker daemon  7.613MB
Step 1/17 : FROM node:16-alpine as builder
 ---> 51405b97d471
Step 2/17 : WORKDIR /home/node/build
 ---> Using cache
 ---> 88d9a8e1c9ae
Step 3/17 : COPY package.json .
 ---> Using cache
 ---> 303eb67be26d
Step 4/17 : COPY package-lock.json .
 ---> Using cache
 ---> 7ede716cef2c
Step 5/17 : RUN npm install --include=dev
 ---> Running in 9606e6528fce
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-lottie@1.2.3
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peerOptional react@"^16.8.0 || ^17.0.0" from @apollo/client@3.5.9
npm ERR!   node_modules/@apollo/client
npm ERR!     @apollo/client@"^3.5.9" from the root project
npm ERR!   17 more (@reduxjs/toolkit, @testing-library/react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.7 || ^15.0.0 || ^16.0.0" from react-lottie@1.2.3
npm ERR! node_modules/react-lottie
npm ERR!   react-lottie@"^1.2.3" 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.7 || ^15.0.0 || ^16.0.0" from react-lottie@1.2.3
npm ERR!   node_modules/react-lottie
npm ERR!     react-lottie@"^1.2.3" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-11-05T11_22_19_069Z-debug-0.log
1 error occurred:
        * Status: The command '/bin/sh -c npm install --include=dev' returned a non-zero code: 1, Code: 1
infracritical commented 2 years ago

I am getting this error, too. This is being built on the latest release of CentOS 7, and npm v9.1.2 was updated, too.

princetechs commented 2 years ago

ADD --force in client/docker file then docker will run fine. example:-

`FROM node:16-alpine as builder

WORKDIR /home/node/build COPY package.json . COPY package-lock.json . RUN npm install --include=dev --force`