'Why can't Heroku find a folder my computer can?

My discord bot runs on my computer when I use node index.js but when I do the same thing in the heroku terminal I get the following error which is odd because ./commands is a folder in the connected github and it's working fine on my computer.

node:internal/fs/utils:344
    throw err;
    ^

Error: ENOENT: no such file or directory, scandir './commands'
    at Object.readdirSync (node:fs:1390:3)
    at Object.<anonymous> (/app/index.js:19:25)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: './commands'


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source