Error : Cannot File Module

Hello,
I start the mooc : BackEnd > Basic Node and Express

I use .replit, i import template from Git Hub
I add a simple console.log("Hello World") on myApp.js

I run the .replit console.

And this is the answer :

` Error: Cannot find module '/home/runner/boilerplate-express-5/index.js'
Require stack:
- /nix/store/13sxby28d6x7r98ggggp0gk5al4hdj9f-prybar-nodejs-0.0.0-7d40edb/prybar_assets/nodejs/module-context-hook.js
- /tmp/prybar-nodejs-4031415640.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.resolve (internal/modules/cjs/helpers.js:80:19)`

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Challenge: Meet the Node console

Link to the challenge:

Hi,

https://boilerplate-express-6.frogfox.repl.co

Try removing the console.log("Hello World"); from the .replit file.

https://replit.com/@frogfox/boilerplate-express-6?v=1#.replit

Edit: the console.log() should be inside myApp.js

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.