ffamilyfriendly / Thread-Watcher

Discord bot that automatically un-archives threads
https://threadwatcher.xyz
MIT License
56 stars 8 forks source link

Unable to build #83

Open Kitof opened 8 months ago

Kitof commented 8 months ago

I'm unable to build the current version with the following error

docker build -t thread-watch bot/

[+] Building 4.5s (15/19)                                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                                     0.0s
 => => transferring dockerfile: 1.53kB                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/node:18-slim                                                                                                          0.4s
 => [internal] load metadata for gcr.io/distroless/nodejs18-debian11:nonroot                                                                                             0.4s
 => [internal] load .dockerignore                                                                                                                                        0.0s
 => => transferring context: 160B                                                                                                                                        0.0s
 => [builder 1/8] FROM docker.io/library/node:18-slim@sha256:246bf34b0c7cf8d9ff7cbe0c1ff44b178051f06c432c8e7df1645f1bd20b0352                                            0.0s
 => [internal] load build context                                                                                                                                        0.0s
 => => transferring context: 176.47kB                                                                                                                                    0.0s
 => [bot 1/6] FROM gcr.io/distroless/nodejs18-debian11:nonroot@sha256:2e18444e49e114352284f50cab3d06b77858cfe499fb1a5bc382276e6b03ab38                                   0.0s
 => CACHED [bot 2/6] WORKDIR /usr/src/bot                                                                                                                                0.0s
 => CACHED [builder 2/8] RUN apt-get update                                                                                                                              0.0s
 => CACHED [builder 3/8] RUN mkdir -p /usr/src/bot/data                                                                                                                  0.0s
 => CACHED [builder 4/8] WORKDIR /usr/src/bot                                                                                                                            0.0s
 => CACHED [builder 5/8] COPY [package.json, yarn.lock*, tsconfig.json, _config.json5, /usr/src/bot/]                                                                    0.0s
 => CACHED [builder 6/8] RUN yarn install --frozen-lockfile && yarn cache clean --force                                                                                  0.0s
 => CACHED [builder 7/8] COPY [./src/, /usr/src/bot/src/]                                                                                                                0.0s
 => ERROR [builder 8/8] RUN yarn run build                                                                                                                               4.0s
------
 > [builder 8/8] RUN yarn run build:
0.369 yarn run v1.22.19
0.392 $ yarn tsc
0.592 $ /usr/src/bot/node_modules/.bin/tsc
3.846 src/commands/public/batch.ts(174,41): error TS2345: Argument of type '[ActionRowBuilder<AnyComponentBuilder>]' is not assignable to parameter of type 'RestOrArray<ActionRowBuilder<TextInputBuilder> | APIActionRowComponent<APITextInputComponent>>'.
3.846   Type '[ActionRowBuilder<AnyComponentBuilder>]' is not assignable to type '[(ActionRowBuilder<TextInputBuilder> | APIActionRowComponent<APITextInputComponent>)[]]'.
3.846     Type 'ActionRowBuilder<AnyComponentBuilder>' is missing the following properties from type '(ActionRowBuilder<TextInputBuilder> | APIActionRowComponent<APITextInputComponent>)[]': length, pop, push, concat, and 35 more.
3.913 error Command failed with exit code 2.
3.913 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
3.948 error Command failed with exit code 2.
3.948 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:26
--------------------
  24 |
  25 |     # Run the build command which creates the production bundle
  26 | >>> RUN yarn run build
  27 |
  28 |     # Create production image without including the toolchain
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn run build" did not complete successfully: exit code: 2
ffamilyfriendly commented 8 months ago

I'm very much a novice with docker so cant help much there but I accidentally pushed breaking WIP code to the repo a while back. Try cloning commit 80a996fa9e3b1c16b2d3cb75dbbc983e0e63fa20 and see if that works better. I'm currently working on getting the WIP code deploy ready which should fix the build issues