-
-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Description
Nodejs does allow cjs and esm codebase only with synchronous require.
The CommonJS module require currently only supports loading synchronous ES modules (that is, ES modules that do not use top-level await).
Modern version of Vitest test to fully base on nodejs module resolution so causing this error.
Error: require() cannot be used on an ESM graph with top-level await. Use import() instead. To see where the top-level await comes from, use --experimental-print-required-tla.
From /lodestar/node_modules/@ethereumjs/ethash/dist/util.js
Requiring /lodestar/node_modules/bigint-crypto-utils/dist/index.node.esm.js
The reason is the use of very old version of @@ethereumjs/* packages in the prover package.
lodestar/packages/prover/package.json
Lines 54 to 61 in 688d558
| "@ethereumjs/block": "^4.2.2", | |
| "@ethereumjs/blockchain": "^6.2.2", | |
| "@ethereumjs/common": "^3.1.2", | |
| "@ethereumjs/rlp": "^4.0.1", | |
| "@ethereumjs/trie": "^5.0.5", | |
| "@ethereumjs/tx": "^4.1.2", | |
| "@ethereumjs/util": "^8.0.6", | |
| "@ethereumjs/vm": "^6.4.2", |
The above issue can be fixed by upgrading these packages.
Metadata
Metadata
Assignees
Labels
No labels