Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join field throws 'Error: $lookup with 'pipeline' may not specify 'localField' or 'foreignField'' #8900

Closed
JessChowdhury opened this issue Oct 28, 2024 · 3 comments

Comments

@JessChowdhury
Copy link
Member

Describe the Bug

Join field throws the following error, only related to mongodb.

Image

The code causing the error is in packages/db-mongodb/src/utilities/buildJoinAggregation.ts

From what I have read, this could be caused by version incompatibility. Read here.

Link to the code that reproduces this issue

pnpm dev joins

Reproduction Steps

  • setup with mongodb
  • run joins test suite
  • open http://localhost:3000/admin in browser
  • see error immediately

Which area(s) are affected? (Select all that apply)

db-mongodb

Environment Info

Payload: beta@latest
Node.js: v20.9.0
Next.js: v15.0.0

@DanRibbens
Copy link
Contributor

I'm not seeing this error @JessChowdhury. Are you still getting this error? I would like you to show me if so.

@JessChowdhury
Copy link
Member Author

This error was caused by incompatibility with MongoDB version v4.4.0.

For anyone experiencing this in the future, check your version against the published MongoDB Software Lifecycle schedule found here. Payload does not support versions which have passed their End Of Life Date.

If your version is outdated, follow instructions to upgrade to the latest stable MongoDB version.

If your version is current and the issue persists, drop us a note here or open a new issue. Thanks!

Copy link

github-actions bot commented Nov 3, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants