When using Path.resolve(./src/Modules) it will return Error: ENOENT: no such file or directory, scandir, or in other words, it won't be able to find the directory. This at least counts for Windows systems however path.join is a method that works regardless of the system and generally highly recommended whatsoever. More on path.join here. and on the __dirname variable here
When using Path.resolve(
./src/Modules
) it will returnError: ENOENT: no such file or directory, scandir
, or in other words, it won't be able to find the directory. This at least counts for Windows systems howeverpath.join
is a method that works regardless of the system and generally highly recommended whatsoever. More on path.join here. and on the __dirname variable here