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.

User Account Page: TypeError: Cannot read properties of undefined (reading 'auth')

default discord avatar
szymciodriftlast year

Hello, anybody has an idea why i got this error in /admin/account route?


The same occurs at


/admin/collections/users/1 and any other userId



and during creation of the new user


/admin/collections/users/create



My setup:


Payload 3.18.0


Next.js 15.1.5



User Page: TypeError: Cannot read properties of undefined (reading 'auth')


Ignored frames:



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



email


node_modules/payload/dist/fields/validations.js (92:1)


d


node_modules/@payloadcms/ui/dist/exports/client/index.js (48:90293)


s


node_modules/@payloadcms/ui/dist/exports/client/index.js (48:45930)


H


node_modules/@payloadcms/ui/dist/exports/client/index.js (48:46397)


t


node_modules/@payloadcms/ui/dist/exports/client/index.js (48:21991)




I use default Users collection config from payload website template:


export const Users: CollectionConfig = {
  slug: 'users',
  access: {
    admin: authenticated,
    create: authenticated,
    delete: authenticated,
    read: authenticated,
    update: authenticated,
  },
  admin: {
    defaultColumns: ['name', 'email'],
    useAsTitle: 'name',
  },
  auth: true,
  fields: [
    {
      name: 'name',
      type: 'text',
    },
  ],
  timestamps: true,
}

`



User Account Page: TypeError: Cannot read properties of undefined (reading 'auth')



I updated to payload 3.23.0 and error doesn't occur anymore.

    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.