flappybird
flappybirdβ€’8mo ago

SyntaxError on Web3 package

I'm trying to use this module in my project https://deno.land/x/web3@v0.11.1 and i'm using the code from the examples in my Supabase project, like import Web3 from 'https://deno.land/x/web3@v0.11.1/mod.ts' const providerURL = Deno.args[0] const web3 = new Web3(new Web3.providers.HttpProvider(providerURL)) This is used in one of my api routes. and but everytime i call the route, I've been getting this error Uncaught SyntaxError: The requested module 'https://jspm.dev/@ethereumjs/common' does not provide an export named 'default' at https://deno.land/x/web3@v0.7.3/packages/web3-eth-accounts/src/index.js:34:8 InvalidWorkerCreation: worker boot error can someone help please 😦 i tried running a --reload on the cache for this module but it didn't work.
1 Reply
Deno AI Helper
Deno AI Helperβ€’8mo ago
I'm sorry to hear that you're having trouble with the Web3 module. The error message you're seeing suggests that the module @ethereumjs/common is not exporting a default export, which the web3 module is trying to import. This could be due to a few reasons: 1. The version of @ethereumjs/common that web3 is trying to import does not have a default export. This could be a version mismatch issue. 2. The web3 module might not be fully compatible with Deno. Not all npm packages are compatible with Deno due to differences in the runtime environments of Node.js and Deno. Unfortunately, the documentation does not provide a clear solution to this issue. As a general debugging advice, you could try using a different version of the web3 module to see if the issue persists. If the problem continues, it might be worth reaching out to the maintainers of the web3 module for Deno to report this issue.