unsphereU
Convex Community3y ago
1 reply
unsphere

Using solc inside actions

I want to use the solc lib inside functions. The lib has dependencies to fs or path. I already put "use node" on top with only actions inside and still get the following error. I will not use any function from solc that uses fs and others.

[ERROR] Could not resolve "fs"

node_modules/solc/soljson.js:115:21:
115 │ fs = require("fs");
~~~~

The package "fs" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this
error.
Was this page helpful?