Weird build issue on prod

default discord avatar
thisisnotchris
10 months ago
14

Hello team! I'm building our payload site for prod, getting this weird build error. I think it's related to my dotenv?

  • default discord avatar
    noheadphones
    10 months ago

    whats your full payload config file?

  • default discord avatar
    thisisnotchris
    10 months ago

    so we're thinking the dotenv is getting bundled in the frontend of the admin



    not sure why



    SOLVED:



    Was using dotenv in a collection config by mistake



    wait not solved



    @jmikrut Any reason why building payload for prod would keep giving me an error about dotenv



    I'm using it in my payload.config.ts



    And for some reason it fails at the .config command on dotenv require





    @noheadphones This was the error on local btw



    WAIT



    I'm a dummy



    taking it out worked

    image.png
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.