denodrivers / denodrivers/mongo

Uncaught BSONError: cyclic dependency detected

Open
#379 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
511
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Hey I am trying to use the package but I am getting this error.
I am unsure how why and where this is coming from so here is some code I used with the package:

```ts
const panel = await panels.findOne({
pId,
guildId: interaction.guildId!.toString(),
});
```

```ts
await panels.deleteOne({ pId, guildId: interaction.guildId?.toString() });
```

```ts
await panels.replaceOne({ pId: { $eq: panel.pId } }, panel);
```

```ts
const panels = await database.collection("panels").countDocuments();
```

```ts
await panels.updateOne(panel, { $push: { blacklisted: { $each: [user] } } });
```

```ts
await panels.updateOne({ pId: { $eq: panel.pId } }, {
$pull: { blacklisted: user },
});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file, test, or specific failing operation is identified. Start by reproducing the BSONError with the shown findOne, replaceOne, updateOne, and deleteOne calls, then isolate which operation and value creates the cyclic dependency. Done means identifying the triggering input and documenting or fixing the driver behavior with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.