-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
created-by: Contributorstatus: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet
Description
Describe the Bug
After following the reproduction steps and clicking on the "Create" button on the "Create first user" screen, Payload tries to send a POST request to http://localhost:3000/api/users/first-register (the default api route) instead of http://localhost:3000/payload/api/users/first-register (the api route for basePath set to "/payload"), leading to a 404 response.
Interestingly, this only occurs in dev mode. When running a production build, the correct api route for first-register is used and the user is created successfully.
Link to the code that reproduces this issue
https://github.com/jefferyto/payload-basepath-first-register
Reproduction Steps
- Checkout the reproduction repo (note that
basePathis set to "/payload" in next.config.mjs),npm install,npm run dev - Open http://localhost:3000/payload/admin in a browser
- Fill in the "Create first user" form and click the "Create" button
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Binaries:
Node: 22.21.1
npm: 11.6.2
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.64.0
next: 15.4.7
@payloadcms/db-sqlite: 3.64.0
@payloadcms/drizzle: 3.64.0
@payloadcms/graphql: 3.64.0
@payloadcms/next/utilities: 3.64.0
@payloadcms/richtext-lexical: 3.64.0
@payloadcms/translations: 3.64.0
@payloadcms/ui/shared: 3.64.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: linux
Arch: x64
Version: #36-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 02:18:29 UTC 2025
Available memory (MB): 7225
Available CPU cores: 4
dotnize and cweseloh
Metadata
Metadata
Assignees
Labels
created-by: Contributorstatus: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet