Closed xkeshav closed 8 years ago
There is a server that's already running, so you cannot start another server.
on starting the $ nodemon server.js
What to do now?
Restart the server [Ctrl+C then nodemon server.js]
No
Check all things in render paths
EX:- res.render
Reinstall all dependencies
$ npm install
Fixed.
Thanks for the fix!
Thank you too. Fixed Il 05 Mag 2016 23:36, "David Isaza" notifications@github.com ha scritto:
Thanks for the fix!
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/linnovate/mean/issues/1066#issuecomment-217287100
Hi, I encountered with the same problem. How do you fix it? Could you describe it in detail? Thanks a lot!
Thank you, I had the same problem, npm install
fixed it
I encountered with the same problem, but npm install didn't fixed the problem (I tryed a lot of times).
Same fucking problem! Still happening after npm install
. Nodemon piece of shit
@Aimanizales please post the full error message you see, or we can't really help you
@Jipsian that stack trace is not from meanio - the error says your local mongod is not running
It could be that nodemon is using a server.js that try to connect with mongodb and if you don't have mongod up and running then nodemon fails to start
I want to it restart automatically after app crashed. I use nodemon in live project. so it is not possible every time to restart server.
I am having the same problem.
I need help..new to this.
Seems your mongodb is down or mongo is not installed. Try to connect via the cli and verify it's up Lior
On Sat, Mar 18, 2017 at 9:46 PM, Sandra Hamel notifications@github.com wrote:
I need help..new to this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/linnovate/mean/issues/1066#issuecomment-287570015, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO9I8Y7HS6f7M0DGyf6bahs-TwasI5Sks5rnDSpgaJpZM4DjLuL .
--
Lior Kesos - http://www.linnovate.net Linnovate - Community Infrastructure Care mail: lior@linnovate.net office: +972 722500881 cell: +972 524305252 skype: liorkesos
I am also having this same issue...anyone solved this issue???
Hi all, I was with the same problem. The problem was that I forgot to start the mongo (sudo mongod) before run my server.
Have you tried with PM2 plugin. This plugin is best solution ever. Once you start with this plugin, after then never required to start it again.
Have a look this link: PM2 npm
@Jipsian did you found how to fix the problem ? Please can you help me 2 ?
stiil now no solution for this??
i am facing problem regarding this any solutn??
Upgrade your node version
I encountered with the same problem, but npm install didn't fixed the problem and my mongodb is running , don't know the reason.
can you send me error screenshot?
This happened to me and I realized it was because I was on the wrong Git Hub branch. I had cloned and forgot to checkout the clone/branch before running terminal commands. If you cloned/checked-out, make sure you are running your npm install and npm run dev AFTER "git checking out" the right branch / folder
The latest Nodemon seems still have this bug.
The error 90% will be in your package json file, check out the json file package and see if you miss something in there. it happened to me sometimes and I most of the time i find the error in the json file.
try having node 8.1.1 sometimes the system reverts to an older version of node. i did the following: $ nvm install 8.1.1 $ npm run dev and it worked !
just go to task manager and find the node js server , process and end it, and type nodemon in your terminal , done.
Most likely your node daemon is still running. ps -eaf | grep node
ubuntu 23504 1 0 20:37 pts/0 00:00:00 node /home/ubuntu/project/XXXXX/node_modules/.bin/nodemon server.js
ubuntu 24433 23504 0 22:47 pts/0 00:00:00 sh -c node server.js
ubuntu 24434 24433 0 22:47 pts/0 00:00:00 node server.js
ubuntu 24619 23932 0 22:50 pts/1 00:00:00 grep --color=auto node
if your output is something like above, you already have node server running.
use killall to kill all process sand restart daemon. eg: killall node
If you are on windows, I have found when I ctrl+c in terminal or git terminal, it doesn't kill the process. I have to end the task through task manager.
However, when I run the server on a PowerShell, it's a lot smoother. That is what I suggest running your server on.
just go in task manager, kill mongodb and nodejs sever running, close your app and reopen it.It will work, i been trying a fix the last hour and npm install wasnt doing it.
I had the same problem... the way you fix it is easy. Do as it follows: 1 - go to package.json and and change the "main": "index.js" to "main": "app.js". In this case, my main is app.js, as in the majority of the MEAN tutorials on the internet. 2 - run nodemon again.
I hope it helps you as well :)
If you've installed any other dependencies they may be causing an error. I think I ask a question 6 months ago because I had downloaded Heroku, node, Vue, and a bunch of other stuff all in the same day and there were issues with which versions I was using.
Anywho, not that I know which database or servers you're using but Roku caused a lot of my issues so just because myair seem to be Heroku based, I pasted some info Heroku FAQ re:node below .
DISCLAIMER: Don't take my word for it I don't really know node well enough to be troubleshooting for anyone 🙄 but this heroku article might give you some ideas and other weird errors that might be happening.
https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies
per FaQ above: "Each time you run npm install, npm leaves packages that meet your semver requirements untouched. That’s why an npm install today may lead to a different tree than the npm install you ran yesterday, even if your package.json didn’t change.
Therefore, it’s a good practice to periodically clear node_modules and reinstall from scratch to ensure that your package.json dependencies are still valid:
$ rm -rf node_modules $ npm install --quiet --production $ npm start
In fact, those are essentially the commands that Heroku runs when we build and launch your project. If they work locally, you’re likely to be cloud-ready.
Alternatively, you can add yarn or npm-shrinkwrap to your workflow to lock down dependency versions so that they are consistent from install to install. This is the best practice for production environments."
Good luck. If all else fails quit everything, turn off your computer, let it sit for a while and restart it and sometimes that works
To fix the crashing, go to your app.js. If you have these lines of code. Its normally of the very first lines...
import { Socket } from 'dgram';
const express = require('express');
const bodyParser = require('body-parser');
const ejs = require('ejs');
const Nexmo = require('nexmo');
const socketio = require('socket.io');
Simply delete/remove the first line of code import { Socket } from 'dgram';
and restart your application using "nodemon"
Did it work?
close the cmd,and restart。
if it's Still appear
It means that it has not been turned off and opened the task manager to turn off the node process.
For my situation, I change the express port from 80 to 8090, then it works.
For linux user use this command fuser -ntcp -k your_port_number_that_listen_the_server
I had a similar problem. In my case was nothing to do with nodemon. It was that the node version didn't allow --debug
because it's deprecated. I used --inspect
instead and then it worked for me.
In those cases, you should downgrade node version or use --inspect
.
Solution is here with simple steps
@kumaresan-in This is not watching your file....
'npm i' solved it, but why?
My mongod server was running but still it showing above issue, what's the reason. What should i do?
Can u plz help me out...
I have installed MEAN , it was working yesterday but today it stops working.. http://localhost:3000 is not opening
I don't understand what is wrong?
see the terminal screenshot :