Closed danfinlay closed 2 years ago
I've confirmed that if I install @metamask/eth-sig-util
I have no problems. It seems like some mismatch between how I'm specifying the version of the module to install, maybe how yarn is referencing it, and then how browserify is walking that trie.
I don't know why this would happen, but since there is a reasonably simple workaround and related to Browserify, I will mark this as wontfix
. I am reasonably confident it's related to Browserify because their resolve
package is in your stack trace: https://npmjs.com/package/resolve
Now, to expand on our philosophy here, mm-snap build
is supposed to be a useful default that handles the majority of use cases. It uses Browserify under the hood because we use Browserify at MetaMask, and we have found that other popular bundlers (e.g. Rollup and Webpack) are similarly if not more finicky in practice. As of version 0.12.0
of this monorepo, we have started shipping bundler plugins that contain our transforms to make it easy for people to bring their own bundlers.
In conclusion, if there were no workaround for this we might take a closer look, but since there is a workaround, I will close the issue outright.
I started making a snap for EIP-712 signTypedData_v5, to somewhat test the theory that flask could be a place for prototyping new signature methods as I claimed on twitter.
I hit an issue with dependency resolution. This may be a problem with the fact that I tried to specify this particular dependency from a specific commit of a user's github repository. Maybe the current build process doesn't play friendly with these? I'm not sure why else, the module appears to be in my
node_modules
directory.I installed the modified version of
eth-sig-util
using this command:yarn add https://github.com/cammellos/eth-sig-util/archive/c3f38825130e5c9847300f647f6857f3360c0be5.tar.gz -S
I hoped this would hash-lock the snap dependency at cammellos's latest commit for this (which he namespaces as v4, but I expose as v5) available here.
Curious if anyone else has experienced this or has a lead on the solution.
The error I got: