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.

Deployment Process Stays At Screen

default discord avatar
muperdev2 years ago
24

I just deployed my project to cloud but it stays in deployment screen for 1 day

  • default discord avatar
    jessrynkar2 years ago

    Hi

    @599971721490989117

    what is your project name? we'll look into this, definitely shouldn't be taking that long to deploy

  • discord user avatar
    jarrod_not_jared
    2 years ago

    Also do your build logs say successful at the bottom of that tab?

  • default discord avatar
    muperdev2 years ago

    karency



    it says build failed



    Am I need to delete the project?!

  • discord user avatar
    jarrod_not_jared
    2 years ago

    Can you screenshot and send in the error if it shows one on that screen?

  • default discord avatar
    muperdev2 years ago

    sure



  • discord user avatar
    jarrod_not_jared
    2 years ago

    In your package json file, you have a

    build

    script right?

  • default discord avatar
    muperdev2 years ago

    I Do have



  • default discord avatar
    jessrynkar2 years ago

    We have found that if your project contains a

    package-lock.json

    file, DigitalOcean assumes

    npm

    by default (mentioned in the error logs) and the default payload build settings use

    yarn

    unless you change them.



    So you can fix this error two ways:


    - remove the package-lock.json file and use yarn.lock


    - update the build commands in the payload UI (from yarn to npm)



    We will look to improve this in the future by adding checks to detect npm / yarn use 👍 Let us know if this works for you

  • default discord avatar
    muperdev2 years ago

    the problem is I don't have access to payload UI to do that part



    it's in loading session



  • default discord avatar
    jessrynkar2 years ago

    Unfortunately you'll need to create / deploy the project again - we will push an update soon to exposing the settings during deployment so that you have access to it in the future

  • default discord avatar
    muperdev2 years ago

    ok but can you please delete it for me first?

  • default discord avatar
    jessrynkar2 years ago

    absolutely - I've just deleted it for you, the project should be gone from your payload UI now if you refresh

  • default discord avatar
    muperdev2 years ago

    yeah, it's gone, thank you by the way





    actually I deployed a new one, but I have this problem in deployment



    my port is 3000 in server file and my env file is also the same as my another project in payload which was successful



    can you please delete this project for me again?

  • default discord avatar
    jessrynkar2 years ago

    hey

    @599971721490989117

    yes I can delete it for you - looks like the

    npm build

    command is causing the error and needs to be updated to

    npm run build

    project should be gone now, just deleted

  • default discord avatar
    muperdev2 years ago

    yes I didn't have this problem with my previous project, don't know why this happened here, maybe it's because of the yarn and npm



    sure thank you i'll try again

  • default discord avatar
    jessrynkar2 years ago

    yeah probably a result of the yarn / npm switch



    let us know if you run into any other problems

  • default discord avatar
    muperdev2 years ago

    sure thanks for support

  • default discord avatar
    jessrynkar2 years ago

    happy to help!

  • default discord avatar
    muperdev2 years ago


    we have this error now

  • default discord avatar
    jessrynkar2 years ago

    looking into it



    strange... just to check the basics here, you do have a

    payload.config

    file in your src folder? and when you

    npm run build

    locally, does this error happen?

  • default discord avatar
    muperdev2 years ago

    yes for sure



    let me check npm locally



    it's done locally



    no problem

  • default discord avatar
    jessrynkar2 years ago

    okay great - can you confirm that the environment variables you entered when deploying this project are the same as your local environment?

  • default discord avatar
    muperdev2 years ago


    these 2 was my ENV

  • default discord avatar
    jessrynkar2 years ago

    that looks right, this is an odd error but we're trying to figure it out now



    In your

    src

    folder, do you have a .npmrc file? if so, follow these steps:


    - delete your .npmrc file


    - delete your node_modules folder


    - delete your yarn.lock file


    - rerun npm install locally



    Then commit these changes to your repo, the commit will trigger a redeploy and then we'll check if the build error is gone.



    We were able to replicate and it appears to be a conflict with using

    .npmrc

    to handle legacy dependancies and the npm version that digital ocean runs. The steps above fixed the error for us.

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.