Node JS MODULE_NOT_FOUND Error

 node main.js
node:internal/modules/cjs/loader:998
throw err;
^

Error: Cannot find module ‘/home/runner/lanternbot-1/main.js’
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}

Node.js v18.12.1
exit status 1

You should probably make the title a bit less long and more descriptive… Welcome to Replit!

2 Likes

you need a file named “main.js”, you don’t have one so there is no entry point for your code

2 Likes

Hey @matveishabrin welcome to the community!

I have changed the title to be a little more descriptive. As @InvisibleOne said you should have a file called main.js.

1 Like