Specify where payload can find payload.config.ts

default discord avatar
2 months ago

Hello everyone, I'm working on setting up payload in a nx-monorepo. I'm going the self-installation route by attaching payload to an existing express application but am getting a compilation error when starting the dev server.

Payload can't locate


. I'm thinkig it could be resolved if I could give payload a hint on where to locate the config file.

Here's a sample repo for review:


I've included screen caps of my source tree and the stacktrace I see.

  • default discord avatar
    2 months ago

    @warrensadler That is defined in your package.json commands

    or via ENV variable


    Check out your


    file first to see if changing it there fixes things

  • default discord avatar
    2 months ago

    That did the trick @notchr , that was the solution! Now I'm facing some other issues getting payload to play nicely with NX. I appreciate your help!

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


Connect with the Payload Community on Discord



Can't find what you're looking for?

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