bkhi

hansbkhiHOBBY

6 months ago

initialization is right but build image doesnt working and this the report :

12 0.861 Attention: Next.js now collects completely anonymous telemetry regarding usage.

12 0.861 This information is used to shape Next.js' roadmap and prioritize features.

12 0.861 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:

12 0.861 https://nextjs.org/telemetry

12 0.861

12 0.935 Creating an optimized production build …

12 13.67 ✓ Compiled successfully

12 13.67 Linting and checking validity of types …

12 20.55 Failed to compile.

12 20.55

12 20.55 ./src/hooks/useOrderNotifications.ts:45:5

12 20.55 Type error: 'socket' is possibly 'null'.

12 20.55

12 20.55 43 |

12 20.55 44 | const updateOrderStatus = (orderId: string, status: string) => {

12 20.55 > 45 | socket.emit('updateOrderStatus', { orderId, status });

12 20.55 | ^

12 20.55 46 | };

12 20.55 47 |

12 20.55 48 | return {

12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1

[stage-0 8/10] RUN --mount=type=cache,id=s/38c18211-b901-4e4e-a965-7b3cc77c6252-next/cache,target=/app/.next/cache --mount=type=cache,id=s/38c18211-b901-4e4e-a965-7b3cc77c6252-nodemodules/cache,target=/app/nodemodules/.cache npm run build:

20.55 ./src/hooks/useOrderNotifications.ts:45:5

20.55 Type error: 'socket' is possibly 'null'.

20.55

20.55 43 |

20.55 44 | const updateOrderStatus = (orderId: string, status: string) => {

20.55 > 45 | socket.emit('updateOrderStatus', { orderId, status });

20.55 | ^

20.55 46 | };

20.55 47 |

20.55 48 | return {

Dockerfile:24

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/38c18211-b901-4e4e-a965-7b3cc77c6252-next/cache,target=/app/.next/cache --mount=type=cache,id=s/38c18211-b901-4e4e-a965-7b3cc77c6252-nodemodules/cache,target=/app/nodemodules/.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: 1

Error: Docker build failed.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

0 Replies