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
If you have see error like this.You must do following two steps.
Uninstall solc:
npm uninstall solc
Reinstall one of two versions:
The version used in the course:
npm install --save solc@0.4.17
or
The newest version that will not break:
npm install --save solc@0.4.25
source - Udemy - Ethereum and Solidity The Complete Developer's Guide