I am trying to compile solidity smart contract using npm solc. I tried to follow different examples. Link to example: https://medium.com/coinmonks/how-to-compile-a-solidity-sma
Which version of solc are you using?
Solc released a breaking version the other day, this error is related to that.
npm uninstall solc npm install solc@0.4.25