Like what we’re doing? Star us on GitHub!

Error using payload generate graphQLSchema

\ ឵឵឵
last month

Recently, started getting this error when trying to run

payload generate:graphQLSchema


  const directives = schema.getDirectives().filter(directiveFilter);

TypeError: Cannot read properties of undefined (reading 'getDirectives')

The full command I'm using is

dotenv payload generate:graphQLSchema

, and


is defined in .env, though I have also tried running it with

-v PAYLOAD_CONFIG_PATH=src/payload.config.ts

just to be sure.

I have generated the GraphQL schema successfully recently, so wondering if this looks familiar to anyone.

  • \ ឵឵឵
    last month

    @denolfe Thanks!

  • generator101
    4 weeks ago

    @denolfe I am getting a different error

    const err = new MongooseError(message);


    MongooseError: Operation


    buffering timed out after 10000ms

    I updated to version 1.6.12

  • denolfe
    Payload Team
    4 weeks ago

    That typically indicates a connectivity issue to your mongo server

    or a permissions issue

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More