flashbots / flashbots/flashbots-docs
Incompatibility between `@flashbots/ethers-provider-bundle` (v1.x.x) and ethers (v6.x.x)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 245
- Forks
- 197
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I found an incompatibility issue when using `@flashbots/ethers-provider-bundle` version 1.x.x with ethers version 6.x.x, resulting in a module not found error.
**Component:** `@flashbots/ethers-provider-bundle`
**Steps to reproduce bug:**
1. Set up a Node.js project with `ethers` v6.x.x and `@flashbots/ethers-provider-bundle` v1.x.x installed as dependencies in `package.json`.
2. Write or use existing TypeScript/JavaScript code that imports and attempts to initialize `FlashbotsBundleProvider` from `@flashbots/ethers-provider-bundle`.
3. Run the code or tests that involve this import and initialization.
**Expected behavior:**
The `FlashbotsBundleProvider` should be imported and initialized successfully without errors when used with a compatible version of ethers v6, as indicated by the Flashbots library documentation for v1.x.x.
**Actual behavior:**
When running the code, the following error occurs:
```bash
Cannot find module '@ethersproject/web' from 'node_modules/@flashbots/ethers-provider-bundle/build/index.js'
```
This error indicates that the Flashbots library is attempting to import a module (`@ethersproject/web`) that is part of the ethers v5 structure but is not present or has been moved/removed in ethers v6.
**Version number:**
* `ethers`: ^6.11.1
* `@flashbots/ethers-provider-bundle`: ^1.0.0 (the latest version)
* Node.js: v20.18.1
**Operating system:**
Windows 11
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginnen Sie mit den Abhängigkeitsversionen in package.json und dem Import von FlashbotsBundleProvider. Reproduzieren Sie anschließend den Fehler mit den gemeldeten Versionen von ethers, @flashbots/ethers-provider-bundle und Node.js. Untersuchen Sie node_modules/@flashbots/ethers-provider-bundle/build/index.js und bestätigen Sie, dass eine unterstützte Konfiguration ohne den Fehler „@ethersproject/web module not found“ initialisiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- node.js, typescript
- Bereich
- blockchain
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100