My replit is not running my code which I placed in a folder

Error: Cannot find module ‘/home/runner/Data-Structures-and-Algorithms-in-Javascript/index.js’
Require stack:

  • /nix/store/qpnf0dafrfsbcwb4z7cphjm0dff0vl7l-prybar-nodejs-0.0.0-e0d9a52/prybar_assets/nodejs/module-context-hook.js
  • /tmp/prybar-nodejs-469512605.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    Hint: hit control+c anytime to enter REPL.

    (To exit, press Ctrl+C again or Ctrl+D or type .exit)

You can change the file you want to run by going to the .replit file (you have to Show Hidden Files first) and changing the entrypoint field to the file you want to run.

3 Likes