Tell us what’s happening:
When I run the code from the local file on my machine, I get the “Hello World” logged
But I’m using Glitch to submit the exercise.
All I did was add
console.log(“Hello World”)
to the myApp.js file. When I try to run the app in Glitch by typing
node myApp.js
I get this error:
Error: Cannot find module ‘express’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/app/myApp.js:1:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
and when I paste the link in to run the test, it doesn’t pass, I get:
test timed out.
Your project link(s)
https://grand-short-army.glitch.me
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Basic Node and Express - Meet the Node console
Link to the challenge: