title: Error: spawn ENOENT while using GM in node
body: <p>When I try to resize an image like this:</p>
  
  <pre><code>                gm('public/uploads/1710410635.jpg')
                  .resize(240, 240)
                  .noProfile()
                  .write('public/uploads/1710410635_t.jpg', function (err) {
                    if (!err) console.log('done');
                  });
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>events.js:72
          throw er; // Unhandled 'error' event
                ^
  Error: spawn ENOENT
      at errnoException (child_process.js:945:11)
      at Process.ChildProcess._handle.onexit (child_process.js:736:34)
  </code></pre>
  
  <p>My file structure is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/pos7a.png" alt="enter image description here"></p>
  
  <p>The code is executed in the <code>postnewsitem.js</code> file</p>
  
  <p>why is this error occurring &amp; how do I solve it ?</p>
  
  <p>edit: GraphicsMagick works, proof:</p>
  
  <p><img src="https://i.stack.imgur.com/w9M7R.png" alt="enter image description here"></p>