need help to deploy nextjs 13 + prisma project
zhking13
HOBBYOP

2 years 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

`

24 Replies

zhking13
HOBBYOP

2 years ago

cf393a3b-e3ca-4a8a-89e1-dc020f26f5e7


2 years ago

please provide your full build logs with this



2 years ago

build logs please


zhking13
HOBBYOP

2 years ago


2 years ago

please provide your full build logs with this


zhking13
HOBBYOP

2 years ago


zhking13
HOBBYOP

2 years 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


2 years ago

follow the 3 steps listed on that site


zhking13
HOBBYOP

2 years ago

i dit it but it juste open the link


2 years ago

follow the 3 steps please


zhking13
HOBBYOP

2 years ago


2 years 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

zhking13
HOBBYOP

2 years ago

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

1220523823334559744


2 years ago

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


zhking13
HOBBYOP

2 years ago

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


2 years ago

the build command is ran during build


zhking13
HOBBYOP

2 years ago

how to serve the build file in prod


2 years ago

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


zhking13
HOBBYOP

2 years ago

To fixe ckerk issue i need to have domain for production


2 years ago

yeah that is correct


2 years ago

do you own a domain?


zhking13
HOBBYOP

2 years ago

No


2 years ago

then you know what you need to do next


Loading...