Everything was working fine until today that when I try to use readFileSync
it gives me [Function]
for every kind of file. In my example when I try to compile the contract it gives me
'Error parsing input JSON: * Line 1, Column 1\n Syntax error: value, object or array expected.\n'
> code = fs.readFileSync('Voting.sol').toString
[Function]
> compiledCode = solc.compile(code)
{ errors: [ 'Error parsing input JSON: * Line 1, Column 1\n Syntax error: value, object or array expected.\n' ] }
I reinstall nodejs and npm but still I get the same error. Any help?