0
As Max Rogério answered in the comments of the question, the lack of ./
before the file or the . js path to be set was causing the error.
To fix just add the ./
before filing. Ex: nodemon ./server.js
0
0
As Max Rogério answered in the comments of the question, the lack of ./
before the file or the . js path to be set was causing the error.
To fix just add the ./
before filing. Ex: nodemon ./server.js
Browser other questions tagged javascript node.js nodemon
You are not signed in. Login or sign up in order to post.
How are you doing the command of
nodemon
? I believe this is happening because you have no index at the root of your project or you do not pass any file as parameter to nodemon, ex:nodemon ./server.js
– Max Rogério
I am using the "nodemon server.js" command. So much so that in the console it starts the server (I have the server port printed), but it takes a few minutes for it to respond to any request from me. I’m using express, Hbs and Helmet
– João Pedro Silva Dezembro
I don’t know if the problem could be
nodemon
, in doubt tries to use thelive-server
. Just to make sure you try using the command with./
(I don’t know if it will be different), like this:nodemon ./server.js
...– Max Rogério
Using " . / " solved the problem by the looks of it. I will continue to do more tests while programming but thank you from now!
– João Pedro Silva Dezembro
He must have thought
server.js
is a command, so when you put./
implied that it was a file of yours.– Max Rogério