title: npm solc: AssertionError [ERR_ASSERTION]: Invalid callback specified
body: <p>I am trying to compile solidity smart contract using npm solc. I tried to follow different examples. 
  Link to example: <a href="https://medium.com/coinmonks/how-to-compile-a-solidity-smart-contract-using-node-js-51ea7c6bf440" rel="noreferrer">https://medium.com/coinmonks/how-to-compile-a-solidity-smart-contract-using-node-js-51ea7c6bf440</a></p>
  
  <p>I wrote my code like following:</p>
  
  <pre><code>const path = require('path');
  const fs = require('fs');
  const solc = require('solc');
  
  
  
  const helloPath = path.resolve(__dirname, 'contracts', 'hello.sol');
  console.log("First" + helloPath);
  const source = fs.readFileSync(helloPath, 'UTF-8');
  console.log("Second" + source);
  console.log(solc.compile(source, 1));
  </code></pre>
  
  <p>I am getting following error when running the above code.</p>
  
  <pre><code>AssertionError [ERR_ASSERTION]: Invalid callback specified.
      at wrapCallback (C:\Users\mouazzamj058\solc_example\node_modules\solc\wrapper.js:16:5)
      at runWithReadCallback (C:\Users\mouazzamj058\solc_example\node_modules\solc\wrapper.js:37:42)
      at compileStandard (C:\Users\mouazzamj058\solc_example\node_modules\solc\wrapper.js:78:14)
      at Object.compileStandardWrapper (C:\Users\mouazzamj058\solc_example\node_modules\solc\wrapper.js:85:14)
      at Object.&lt;anonymous&gt; (C:\Users\mouazzamj058\solc_example\example.js:4:19)
      at Module._compile (module.js:652:30)
      at Object.Module._extensions..js (module.js:663:10)
      at Module.load (module.js:565:32)
      at tryModuleLoad (module.js:505:12)
      at Function.Module._load (module.js:497:3)
  </code></pre>
  
  <p>Please help.</p>