need help to deploy nextjs 13 + prisma project

zhking13HOBBY

a year ago

hello i get this error when deploy my fullstack nextjs project on railway here is my build log
` # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/3f6705bc-8b10-4b26-9084-0ce96be52ad7-next/cache,target=/app/.next/cache --mount=type=cache,id=s/3f6705bc-8b10-4b26-9084-0ce96be52ad7-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

`

1 Replies

zhking13HOBBY

a year ago

cf393a3b-e3ca-4a8a-89e1-dc020f26f5e7


a year ago

please provide your full build logs with this



a year ago

build logs please


zhking13HOBBY

a year ago


a year ago

please provide your full build logs with this


zhking13HOBBY

a year ago


zhking13HOBBY

a year ago

12 46.42 ./node_modules/next/router.js

12 46.42 ./node_modules/@clerk/nextjs/dist/esm/pages/ClerkProvider.js

12 46.42 ./node_modules/@clerk/nextjs/dist/esm/components.client.js

12 46.42 ./node_modules/@clerk/nextjs/dist/esm/index.js

12 46.42

12 46.42 - info Linting and checking validity of types…

12 50.13

12 50.13 Failed to compile.

12 50.13

12 50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/_components/image-form.tsx

12 50.13 62:25 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13 94:23 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13

12 50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components/chapter-access-form.tsx

12 50.13 76:25 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13 89:28 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13

12 50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components/chapter-video-form.tsx

12 50.13 97:102 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13

12 50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx

12 50.13 114:31 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

12 50.13

12 50.13 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules

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/3f6705bc-8b10-4b26-9084-0ce96be52ad7-next/cache,target=/app/.next/cache --mount=type=cache,id=s/3f6705bc-8b10-4b26-9084-0ce96be52ad7-nodemodules/cache,target=/app/nodemodules/.cache npm run build:

50.13 76:25 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

50.13 89:28 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

50.13

50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components/chapter-video-form.tsx

50.13 97:102 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

50.13

50.13 ./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx

50.13 114:31 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities

50.13

50.13 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules

Dockerfile:24

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/3f6705bc-8b10-4b26-9084-0ce96be52ad7-next/cache,target=/app/.next/cache --mount=type=cache,id=s/3f6705bc-8b10-4b26-9084-0ce96be52ad7-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


a year ago

follow the 3 steps listed on that site


zhking13HOBBY

a year ago

i dit it but it juste open the link


a year ago

follow the 3 steps please


zhking13HOBBY

a year ago


a year ago

please see your error message -

Linting and checking validity of types...

./app/(dashboard)/(routes)/teacher/courses/[courseId]/_components/image-form.tsx
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components/chapter-access-form.tsx
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components/chapter-video-form.tsx
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

./app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/page.tsx
Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules

zhking13HOBBY

a year ago

thanks i fixe it but how to moov from dev mode to prod

1220523823334559744


a year ago

looks like you need to properly configure clerk, give their documentation a read


zhking13HOBBY

a year ago

why the start commande is next start and dont use de build one


a year ago

the build command is ran during build


zhking13HOBBY

a year ago

how to serve the build file in prod


a year ago

that would be done automatically by next start
your issue is with clerk


zhking13HOBBY

a year ago

To fixe ckerk issue i need to have domain for production


a year ago

yeah that is correct


a year ago

do you own a domain?


zhking13HOBBY

a year ago

No


a year ago

then you know what you need to do next


need help to deploy nextjs 13 + prisma project - Railway Help Station