9 Replies
Pretty similar issue: https://github.com/alchemyplatform/alchemy-web3/issues/70
GitHub
Bundling on nodejs throws (probably types) · Issue #70 · alchemypla...
> node_modules/swarm-js/node_modules/got/index.js:45:28: error: Could not resolve "electron" (mark it as external to exclude it from the bundle, or surround it with try/cat...
Yes, I saw this and the fix seems to be updating that netlify config, I didn't know what the correspsonding area for us to edit would be to try the same fix
yep, sg. makes sense that electron import isn't working in a server-side context. we'll get back to you soon with some ideas about how to fix this bundler issue within the convex stack
Yes @Omar Farooq there are two separate things happening here. "web3" import not working (we are looking at it) and "electron" import not working. The "electron" seems to be something you import separately
Sorry, forgot to provide update earlier. We have root caused the issue with not being able to import "web3". Working on a fix.
Thank you @presley !
Ok, fix have been deployed to production. The issue was with some node libraries requiring to modify modules they imported via
require()
, which we didn't allow. I have successfully created an action that imports "web3": "^1.8.1". I haven't actually used the library but should work.
Now, we don't see this version of the library depend on electron
. So if you keep having issues with the versions and can't upgrade to a newer version, let me know the exact version you are using and I can check out.Fantastic, thank you. We'll use that web3 1.8.1. Really appreciate it!
(this was just the latest version I got when I ran npm install, so should work with any reasonably new version)
@presley Just wanted to confirm web3 is working. Thank you again!