zfox23 / colorSortedImageGrid

Given a folder of images, sorts the images by color, then outputs the color-sorted image into one NxM image grid.
MIT License
17 stars 3 forks source link

Module not found #1

Closed Erebu5 closed 4 hours ago

Erebu5 commented 6 hours ago

Hello! I'm very new to programming and stumbled across your code for color sorting images. Thank you so much for creating this. Very excited to use it! Unfortunately I'm throwing an error and have no idea how to resolve.

If you're able to help, it would be much appreciated!

Thank you so much.

p-a-l-e-f-i-r-e:images mol3cul3$ node index.js node:internal/modules/cjs/loader:1252 throw err; ^

Error: Cannot find module '/Users/mol3cul3/Desktop/colorSortedImageGrid-1.1.1/images/index.js' at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function._load (node:internal/modules/cjs/loader:1075:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5) at node:internal/main/run_main_module:36:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v22.11.0 p-a-l-e-f-i-r-e:images mol3cul3$

zfox23 commented 4 hours ago

Hi @Erebu5! Thanks for checking out my work!

It looks like you are trying to run the script from this directory:

/Users/mol3cul3/Desktop/colorSortedImageGrid-1.1.1/images/

Instead, try running node index.js from this directory:

/Users/mol3cul3/Desktop/colorSortedImageGrid-1.1.1/

That should fix your issues. Feel free to re-open this issue if you need more help!