0

My compile.js code:

var wrapper = require('solc/wrapper')
var solc = wrapper(window.Module)
const Compile = (code,name) => {
    return solc.compile(code, 1).contracts[':'+name];
};
export default Compile ;

I am getting below error:

./node_modules/solc/node_modules/require-from-string/index.js
Module not found: Can't resolve 'module' in '/Users/amitchambial/work/contractdeployer/node_modules/solc/node_modules/require-from-string'

How to solve this error?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.