Failed deploy on app Nodejs.

Hi guys. I'm having a prpoblems when try to deploy my aplicattion NodeJs. I change my version of Node but isnt sucess. Can you helpe me ?
52 Replies
Percy
Percy17mo ago
Project ID: 12e388d8-83af-4dfe-aeef-72a222fb5503
Thiago Lordello
Thiago Lordello17mo ago
12e388d8-83af-4dfe-aeef-72a222fb5503
rando
rando17mo ago
post your build logs please
Thiago Lordello
Thiago Lordello17mo ago
Okay rando. Thanks This is my last log building : ============== Using Nixpacks ============== context: d18b5c9a5c8bc06c618f0282684d9008 ╔══════ Nixpacks v1.5.1 ═════╗ ║ build │ npm install ║ ║────────────────────────────║ ║ start │ npm run start ║ ╚════════════════════════════╝ #1 [internal] load .dockerignore #1 transferring context: 2B done #1 DONE 0.1s #2 [internal] load build definition from Dockerfile #2 transferring dockerfile: 1.50kB done #2 DONE 0.1s #3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1678752204 #3 DONE 0.1s #4 [1/5] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1678752204@sha256:fba77818e57bebd4e7a02f60d45554354d6ec5a3f7d98b4ee4f6b2a6e720191e #4 DONE 0.0s #5 [internal] load build context #5 transferring context: 116.28kB done #5 DONE 0.1s #6 [2/5] WORKDIR /app/ #6 CACHED #7 [3/5] COPY . /app/. #7 DONE 0.0s #8 [4/5] RUN npm install #8 0.299 /bin/bash: line 1: npm: command not found #8 ERROR: process "/bin/bash -ol pipefail -c npm install" did not complete successfully: exit code: 127 -----
[4/5] RUN npm install:
#8 0.299 /bin/bash: line 1: npm: command not found ----- Dockerfile:15 ------------------- 13 | # build phase 14 | COPY . /app/. 15 | >>> RUN npm install 16 | 17 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm install" did not complete successfully: exit code: 127 Error: Docker build failed Showing 62 logs I try to command 'yarn run build' but is not sucess : ╔══════ Nixpacks v1.5.1 ══════╗ ║ build │ yarn run build ║ ║─────────────────────────────║ ║ start │ npm run start ║ ╚═════════════════════════════╝ #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.50kB done #1 DONE 0.1s #2 [internal] load .dockerignore #2 transferring context: 2B done #2 DONE 0.2s #3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1678752204 #3 DONE 0.1s #4 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1678752204@sha256:fba77818e57bebd4e7a02f60d45554354d6ec5a3f7d98b4ee4f6b2a6e720191e #4 DONE 0.0s #5 [stage-0 2/8] WORKDIR /app/ #5 CACHED #6 [internal] load build context #6 transferring context: 116.28kB done #6 DONE 0.1s #7 [3/5] COPY . /app/. #7 DONE 0.1s #8 [4/5] RUN yarn run build #8 0.377 /bin/bash: line 1: yarn: command not found #8 ERROR: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 127 -----
[4/5] RUN yarn run build:
#8 0.377 /bin/bash: line 1: yarn: command not found ----- Dockerfile:15 ------------------- 13 | # build phase 14 | COPY . /app/. 15 | >>> RUN yarn run build 16 | 17 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 127 Error: Docker build failed Showing 64 logs
Brody
Brody17mo ago
can you share your repo?
Thiago Lordello
Thiago Lordello17mo ago
Yes m, I can Brody.
Thiago Lordello
Thiago Lordello17mo ago
GitHub
GitHub - thiagolordello/todolist_backend
Contribute to thiagolordello/todolist_backend development by creating an account on GitHub.
Brody
Brody17mo ago
you do not have a package.json and package-lock.json add those files, and then define any build or start commands in the scripts fields remove the build and start commands you have set in the service settings and read this docs page please https://docs.railway.app/troubleshoot/fixing-common-errors
Thiago Lordello
Thiago Lordello17mo ago
I was trying find documentation from deploy on site railway but I don’t found. Ten minutes ago I throughout. In the moment i go to barber shop. When I arrive my home. I’m try again. Thanks for help me Brody
Brody
Brody17mo ago
follow those instructions, and it should be good
Thiago Lordello
Thiago Lordello17mo ago
Okay Brody. I will try make your sugestions. Hey Brody. I repeat all process of commits and install npm. packagelock.json and Node Modules there are in my github, but the deploy failed again.
Brody
Brody17mo ago
havent done everything read this docs page please https://docs.railway.app/troubleshoot/fixing-common-errors
Thiago Lordello
Thiago Lordello17mo ago
Okay i see document. Thanks
Brody
Brody17mo ago
okay full build logs please, in a .txt file
Thiago Lordello
Thiago Lordello17mo ago
Okay Brody. Im sending to you in seconds delpoy falied
Want results from more Discord servers?
Add your server