unsphere
unsphere14mo ago

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.
1 Reply
ian
ian14mo ago
Have you installed node types and tried server-side npm install yet?

Did you find this page helpful?