Hey! My sapphire deployment is failing but I don't really know why. It is giving me some errors on the framework's code apparently:
#11 [stage-0 7/10] COPY . /app/.#11 DONE 0.1s#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build#12 1.376 npmWARN config production Use `--omit=dev` instead.#12 1.497#12 1.497 > sapphire-v2@1.0.0 build#12 1.497 > tsc#12 1.497#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.#12 17.52 Types of property 'store' are incompatible.#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.#12 17.52#12 17.52 14 super(ctx, {#12 17.52 ~~~#12 17.52#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;#12 17.52 ~~~#12 17.52 'run' is declared here.#12 17.52#12 17.52#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14#12 17.52#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2-----> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:17.52 ~~~17.5217.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:517.52 2372 run(interaction: Interaction): Promise<boolean>;17.52 ~~~17.52 'run' is declared here.17.5217.5217.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:1417.52-----Dockerfile:24-------------------22 | # build phase23 | COPY . /app/.24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build25 |26 |-------------------ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2Error: Docker build failed
#11 [stage-0 7/10] COPY . /app/.#11 DONE 0.1s#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build#12 1.376 npmWARN config production Use `--omit=dev` instead.#12 1.497#12 1.497 > sapphire-v2@1.0.0 build#12 1.497 > tsc#12 1.497#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.#12 17.52 Types of property 'store' are incompatible.#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.#12 17.52#12 17.52 14 super(ctx, {#12 17.52 ~~~#12 17.52#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;#12 17.52 ~~~#12 17.52 'run' is declared here.#12 17.52#12 17.52#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14#12 17.52#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2-----> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:17.52 ~~~17.5217.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:517.52 2372 run(interaction: Interaction): Promise<boolean>;17.52 ~~~17.52 'run' is declared here.17.5217.5217.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:1417.52-----Dockerfile:24-------------------22 | # build phase23 | COPY . /app/.24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build25 |26 |-------------------ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2Error: Docker build failed
Any help is appreciated Thanks in advance
Solution
Not a Sapphire bug, but rather a semi-breaking type change in latest version that we're announcing in a few minutes.