Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Problems deploying

default discord avatar
usefz895 months ago
10

Hi guys, did anyone encounter this issue before. seems everything is fine the build log is good. However the deployment get stuck here with no other feedback

  • default discord avatar
    webb2410 months ago

    Thanks for doing your due diligence and posting your solution, this worked for me

  • default discord avatar
    binaryoats10 months ago

    So, this worked for me.


    Posting here for anyone struggling with the same error.


    Issue :

    https://github.com/payloadcms/payload/issues/3992#issuecomment-1792742215

    Basically Update the Dockerfile with this


    https://github.com/payloadcms/payload/pull/4029/commits/e61d1761da9c668cdfe2373c0610bd28af9babe9#diff-e1c681d2ddfe02367a933715fd0d31f9bf27fbe3104efb30ae67c5da9a992e1e

    Could you please explain how did you resolve the annoying "BUILD_ID" error?


    So many people are facing the same issue. It would be really nice if you could just give a brief hint.

  • default discord avatar
    hoitzilast year
    @748958834315231314

    I have the same issue with [Error: ENOENT: no such file or directory, open '/home/node/app/.next/BUILD_ID'].


    It would be really nice if you share how you fixed it. Thanks

  • default discord avatar
    hasante_last year
    @748958834315231314

    how did you fix this issue?

  • default discord avatar
    dmitry.komkovlast year

    Any updates on that one

    @748958834315231314

    ? I’m having the same issue

  • default discord avatar
    _itsrajlast year

    but after that getting above error



    i was able to resolve the /home/node/app/.next/BUILD_ID error



    any help



    yarn install v1.22.19
    [1/4] Resolving packages...
    warning Resolution field "jackspeak@2.1.1" is incompatible with requested version "jackspeak@^2.3.5"
    success Already up-to-date.
    Done in 3.87s.
    yarn run v1.22.19
    $ cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NODE_ENV=production node dist/server.js
    unhandledRejection [Error: ENOENT: no such file or directory, open '/home/node/app/.next/BUILD_ID'] {
      errno: -2,
      code: 'ENOENT',
      syscall: 'open',
      path: '/home/node/app/.next/BUILD_ID'
    }
    [13:53:39] INFO (payload): Connected to MongoDB server successfully!
    [13:53:39] INFO (payload): Starting Payload...
    [13:53:39] INFO (payload): Payload Admin URL: https://payload.example.com/admin
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 1


    getting above error



    $ cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NODE_ENV=production node dist/server.js
    unhandledRejection [Error: ENOENT: no such file or directory, open '/home/node/app/.next/BUILD_ID'] {
      errno: -2,
      code: 'ENOENT',
      syscall: 'open',
      path: '/home/node/app/.next/BUILD_ID'
    }


    i uploaded locally built folders (build and dist) to payload and mapped that in docker-compose file



    volumes:
          - ./payload:/home/node/app
          - ./node-modules:/home/node/app/node_modules


    any help



    please find docker-compose file above



    mapped them docker compose file



    I built it locally and moved build and dist folders



    I am using ecommerce template



    I am having issue while deploying

  • discord user avatar
    denolfe
    last year

    Then you'd do

    node dist/server.js

    assuming you're using one of our templates



    Along with an .env file if you use one.



    Yes, you'll need to move the build and dist directories

  • default discord avatar
    bensen_279last year

    which node process do you mean exactly? i built it locally, can i move it to hosting with ftp ?

  • discord user avatar
    denolfe
    last year

    Yes, this is possible as long as you have the ability to execute the node process.



    We have a section in our docs about deployment that will help you out.

    https://payloadcms.com/docs/production/deployment#basics

    Let me know if you have questions 👍

  • default discord avatar
    bensen_279last year

    Quick question is it possible to deploy a payload app on simple webhosting providers? Meaning uploading "build" & "dist" via ftp to webhosting and starting from there?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.