Deployment failing

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 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] 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.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: 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 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] 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.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: 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. tl;dr: You need to use InteractionHandler.LoaderContext instead of PieceContext. Likewise for commands it's Command.LoaderContext, listeners Listener.LoaderContext, and so on....
Jump to solution
4 Replies
Favna
Favna•14mo ago
This will be fixed in 30 minutes or so It is related to new releases that are pending announcement
Solution
kyra
kyra•14mo ago
Not a Sapphire bug, but rather a semi-breaking type change in latest version that we're announcing in a few minutes. tl;dr: You need to use InteractionHandler.LoaderContext instead of PieceContext. Likewise for commands it's Command.LoaderContext, listeners Listener.LoaderContext, and so on.
yibuh
yibuhOP•14mo ago
Thanks for your quick replies! 🙂
kyra
kyra•14mo ago
No problem, we're working on this right now, updating a lot of Sapphire packages ^^
Want results from more Discord servers?
Add your server