I am completely noob to solidity . I am following a tutorial for solidity . Here I have a file name compile.js . When I run this ,I am supposed to get bytecode and abi of my contract . But I got some error saying "RangeError: Maximum call stack size exceeded" How to solve this .
here is my compile.js file :
const path= require('path');
const fs= require('fs');
const solc=require('solc');
const inboxPath=path.resolve(__dirname,'Contracts','inbox.sol');
const source = fs.readFileSync(inboxPath,'utf-8');
module.exports = solc.compile(source,1).Contracts[':inbox'];
//console.log(solc.compile(source,1));
after ruuning this file on terminal I got tons of values but at the end I got this error saying
RangeError: Maximum call stack size exceeded
I am completely a newbie ,I dont want to give up . I tried some solutions ,it seems not to work .
here is my contract :
pragma solidity >=0.4.22 <0.9.0;
contract inboxx {
string public message;
constructor(string memory intialmsg) {
message = intialmsg;
}
function setmessage(string memory newMessage) public {
message = newMessage;
}
}