0

I'm trying to create a little script to resize images. But what ever i do, i get the Error: spawn ENOTDIR

See the rwx file settings here: See the rwx file settings here

I have striped the code to this. And the error still occurs:

const gm = require('gm');
gm('./test-photo.jpg').write('./output.jpg', (err) => {
    console.log(err);
});

My package.json looks like this: My package.json looks like this

This is what i get: This is what i get

node version: node version

I checked allot of examples and searched for others having the same problem. Could not find any, so i must be me forgetting something really silly.

Billy
  • 23
  • 4
  • I could not get it to work. I ended up creating a version of a resizing script in bash, and by exporting that. I'm able to call that from node. – Billy Feb 05 '23 at 10:06

0 Answers0