Stability-AI / StableStudio

Community interface for generative AI
MIT License
8.57k stars 847 forks source link

Yarn install fails #110

Open DJviolin opened 1 year ago

DJviolin commented 1 year ago

Describe the bug

...
7.863 ➤ YN0013: │ zundo@npm:2.0.0-beta.15 can't be found in the cache and will be fetched from the remote registry
7.863 ➤ YN0013: │ zustand@npm:4.3.7 can't be found in the cache and will be fetched from the remote registry
7.863 ➤ YN0013: │ zwitch@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
46.81 ➤ YN0066: │ typescript@patch:typescript@npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=d73830: Cannot apply hunk #12
68.11 ➤ YN0000: └ Completed in 1m 8s
68.15 ➤ YN0000: ┌ Link step
77.43 ➤ YN0007: │ yarn@npm:1.22.19 must be built because it never has been before or the last one failed
77.43 ➤ YN0007: │ protobufjs@npm:6.11.3 must be built because it never has been before or the last one failed
77.43 ➤ YN0007: │ esbuild@npm:0.17.18 must be built because it never has been before or the last one failed
77.58 ➤ YN0007: │ root-workspace-0b6124@workspace:. must be built because it never has been before or the last one failed
98.19 ➤ YN0009: │ root-workspace-0b6124@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-66b83765/build.log)
98.19 ➤ YN0000: └ Completed in 30s 38ms
98.28 ➤ YN0000: Failed with errors in 1m 38s
------
failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn --immutable; \telif [ -f package-lock.json ]; then npm ci; \telif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \telse echo \"Warning: Lockfile not found. It is recommended to commit lockfiles to version control.\" && yarn install; \tfi" did not complete successfully: exit code: 1

To Reproduce Steps to reproduce the behavior:

ARG APP_DIR="/usr/src/StableStudio"

FROM node:20.5.1-bookworm-slim AS base

FROM base AS builder

ARG APP_DIR
WORKDIR ${APP_DIR}

RUN set -e \
    && apt update \
    && apt install -y --no-install-recommends \
        ca-certificates \
        wget \
    && wget -q -P . "https://github.com/Stability-AI/StableStudio/archive/refs/heads/main.tar.gz" \
        && tar -xf ./main.tar.gz -C . --strip-components=1 \
        && rm ./main.tar.gz \
    && rm -rf /var/lib/apt/lists/*

# Install dependencies based on the preferred package manager
# Omit --production flag for TypeScript devDependencies
RUN \
    if [ -f yarn.lock ]; then yarn --immutable; \
    elif [ -f package-lock.json ]; then npm ci; \
    elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
    # Allow install without lockfile, so example works even without Node.js installed locally
    else echo "Warning: Lockfile not found. It is recommended to commit lockfiles to version control." && yarn install; \
    fi

Expected behavior

To run the build.

Does it even need to use Yarn? I feel like an unneeded overhead, NPM can manage workspaces without problems.

Desktop (please complete the following information):

wl52070-kid commented 8 months ago

i have same issue,did you fix it?

DJviolin commented 8 months ago

No, I haven't implemented this stack, choosed different UI. Yarn is still an unnecessary overhead in this project.

LOLSflint commented 7 months ago

I'm experiencing this same issue, did you fix it or get around it somehow? If you did, how did you do it?

DawnAve commented 7 months ago

The same happens here, but it ends with ➤ YN0000: └ Completed in 18s 796ms ➤ YN0000: Failed with errors in 19s 483ms

And I tried the following steps, and it failed, of course

LOLSflint commented 7 months ago

And I tried the following steps, and it failed, of course

Which following steps in particular are you referring to? I'm not very experienced with coding but if there's something I missed that I could try I'd like to see what it is so I can at least try.

DawnAve commented 7 months ago

I did yarn dev in the terminal, which is step 4, and I can open the localhost page but with a bug report on that page

LOLSflint commented 7 months ago

Oh, that's what you meant.

I did yarn dev when it failed as well, but it took so long that I don't know if it succeeded or failed for me :\

I don't think that's a main issue though, rather just my computer being a bit slow because the yarn command took 1 minute for me while it took 19s for you.

DawnAve commented 7 months ago

I agree, seems like step 3 is the fatal one