I was trying to compile my contract using solc compiler but it returning me some errors. I will place my solidity code along with the error that I am getting here. Please help me out to sort this error out asap if possible.

This is the solidity code that I am using:

pragma solidity ^0.4.17;
contract Maxsupply {
    string public message;
    function Maxsupply(string newMessage) public{
        message = newMessage;
    function setmessage(string _message) public{
        message = _message;

This is the code that I have written in javascript for compiling the contract:

const path = require('path');
const fs = require('fs');
const solc = require('solc');
const inboxPath = path.resolve(__dirname,'contracts','message.sol');
const source = fs.readFileSync(inboxPath,'utf8');


(node:1091) V8:
Invalid asm.js: Invalid member of stdlib
  • Hi there. What is the solc command you're using? (Or what is the Javascript code you've written?) What version of solc are you running? Commented Apr 1, 2019 at 14:26
  • Sorry I have updated my question please go through that once again . I have provided the solidity code and about I'm using 0.4.25 version of solc Commented Apr 1, 2019 at 14:32

1 Answer 1


Your node_modules directory is probably corrupted. Try removing it and do npm i again. Also try updating solc version.

  • I have all the stuff you have suggested me but I am unable to sort out this error . Commented Apr 1, 2019 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.