How to fix this error: app crashed - waiting for file changes before starting?
As a beginner, I followed a webdevsimplified course.
I can not fix this error ->
[nodemon] app crashed - waiting for file changes before starting...
I attach also a photo if it helps.40 Replies
src
as a variable is undefined
usually that means you tried to use querySelector and it failed to find the element you're looking for
though I suppose in this case with node, it's something different. Impossible to tell without more info thoughyeah it makes sense, but node_modules is installed with
npm i express ejs express-ejs-layouts
and I did't modified those files at allyou might be missing a .env file in your project root then? Otherwise, no idea
.env is in the project root with this line
DATABASE_URL=mongodb://localhost/mybrary
should i change what is after localhost/?
also in the video tutorial he used .load(), specifying after to use .parse() insteadhere is where he used the function
I saw in comments to use .config() instead, but got another error
where is src coming from?
like where is it defined
1 sec
however, after repacing parse() with config(), i got this
Error: Cannot find module 'mangoose'
dud u install mongoose?
run
npm i mongoose
if not
what does the variabe src represent?I don't know, but I do not use the parse() function anymore
can u show the code where u r requiring mongoose
u dont know?
wdym u dont know the function u r trying to run even takes as arguments
I said I am new to this stuff
cannot find module mangoose
you installed mongoose
no way
way
i get that but u wont be able to debug if u dont know what your code does
u should understand what the function expects
this is correct
if u blindly follow someones footstep u will lose yourself pretty easily
lose
not loose
so true
;-;
loose is the oposite of tight, lose is the oposite of find
i mix them up all the time 😭
i tried to understand but is very different from what i did in highscool with c++
it is, but it isnt as hard as you think
its always overwhelming at first
sure
it gets a lot easier
hmm
should i show you that?
its mongoose
not mangoose
lol
mongoose for mongodb, right?
oh yeah
in my native language 'o' is heard like 'a'
mangoose sounds like a shitty superhero with awful super powers
languages are fun
thanks a lot guys, now it is works
you're welcome