Need suggestions and clarity on couple of errors / warnings I am seeing when building the snap bundle. #1854
Replies: 1 comment 5 replies
-
For 1 and 2, you likely have one or more Node JS dependencies that are not compatible with SES. Recall that Snaps is not a filesystem environment or a browser environment, so Node JS packages that expect one or the other may not work here. Here's a related doc: https://docs.metamask.io/snaps/how-to/troubleshoot/#patch-dependencies I would try one dependency at a time and see when the Snap fails to build. I am pretty sure |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can someone share more insights on below so I can read more and implement fixes. Thank you!
The snap attempted to use one or more Node.js builtins, but no browser fallback has been provided. The MetaMask Snaps CLI does not support Node.js builtins by default. If you want to use this module, you must set polyfills to true or an object with the builtins to polyfill as the key and true as the value. To disable this warning, set
stats.builtIns
tofalse
in your snap config file, or add the module to thestats.builtIns.ignore
array.I have added ethers and few other dependencies in my snap
Failed to evaluate snap bundle in SES. This is likely due to an incompatibility with the SES environment in your snap.
Received the following error from the SES environment:
[TypeError <Object <Object <[Object: null prototype] {}>>>: Cannot read properties of undefined (reading 'env')
Another one I've seen is :
libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
not sure what this means or someone saw it earlier
Beta Was this translation helpful? Give feedback.
All reactions