title: Error while using image-watermark in node.js
body: <p>I am using <code>image-watermark</code> for adding watermark to a file on server side node.js and it is producing an error.</p>
  
  <p>I tried installing modules <code>image-watermark</code>, <code>imagemagick</code>, and other dependencies. At first, I faced a problem similar to <a href="https://stackoverflow.com/questions/46210448/image-watermark-nodejs-showing-error">this</a>. But, this problem was resolved by installing <strong>ImageMagick</strong> into my system and now that is resolved from <a href="https://stackoverflow.com/a/43713441/7514132">this</a> answer.</p>
  
  <p>Now, I am getting an error in the following code:</p>
  
  <pre><code>const watermark = require('image-watermark');
  const imagePath = path.resolve(__dirname,'./relative/path/to/image');
  watermark.embedWatermarkWithCb(imagePath, { 'text': 'sample watermark' }, 
  function (err) {
      if (!err)
        console.log('Succefully embeded watermark');
      else {
        //I am getting error here.
        console.log(err);
      }
  });
  </code></pre>
  
  <p>The image file should be exported with a watermark. But, instead I am getting this error:</p>
  
  <pre><code>{ Error: Command failed:
      at ChildProcess.&lt;anonymous&gt;(...\node_modules\imagemagick\imagemagick.js:88:15)
      at emitTwo (events.js:131:20)
      at ChildProcess.emit (events.js:214:7)
      at maybeClose (internal/child_process.js:925:16)
      at Process.ChildProcess._handle.onexit 
  (internal/child_process.js:209:5) timedOut: false, killed: false, code: 1, 
  signal: null }
  </code></pre>
  
  <p>I used <a href="https://stackoverflow.com/a/27883443/75141320">this</a> answer to get to the root cause of the error. Without that I got <code>Error: spawn ENOENT</code> error only.</p>