Querying LDAP database VIA route handler having issues in build but not dev
Link to the code that reproduces this issue
https://github.com/boncz92/nextjsLdapissue
To Reproduce
To reproduce issue
- run 'npm i'
- run 'npm run build'
- run 'npm run start'
- Hit the endpoint with postman (front end is irrelevant for this report)
To see that it works in dev
- run 'npm i'
- run 'npm run dev'
- Hit endpoint with postman
Current vs. Expected behavior
I would expect the build version to work the same way the development version does.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 65350
Available CPU cores: 28
Binaries:
Node: 20.12.2
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.2.1 // Latest available version is detected (14.2.1).
eslint-config-next: 14.2.1
react: 18.2.0
react-dom: 18.2.0
typescript: 5.4.5
Next.js Config:
output: N/A
This has also been tested on RHEL linux, and Ubuntu
Which area(s) are affected? (Select all that apply)
Not sure, Testing
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
The repository is using a publicly available ldap database to maintain reproducability.
Link to compare from 14.0.2-can.18 and 14.0.2-can.19 Works in Next.js 14.0.0 Next.js 14.0.1 Next.js 14.0.2-canary.18
Does not work in Next.js 14.0.2-canary.19 Next.js 14.1.0 Next.js 14.2.1 Next.js 14.3.0-canary.8
I and another are having the same issue https://github.com/vercel/next.js/discussions/65604
Currently on "next": "^14.2.3"
I and another are having the same issue #65604
Currently on "next": "^14.2.3"
Using ldapts seems to work, I refactored my code to use it instead of ldapjs.
This issue has been automatically marked as stale due to inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
This issue has been automatically closed due to inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!