Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nodemon] app crashed - waiting for file changes before starting... #1066

Closed
xkeshav opened this issue Feb 20, 2015 · 227 comments
Closed

[nodemon] app crashed - waiting for file changes before starting... #1066

xkeshav opened this issue Feb 20, 2015 · 227 comments

Comments

@xkeshav
Copy link

xkeshav commented Feb 20, 2015

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 :

@andrija-hers
Copy link
Contributor

There is a server that's already running, so you cannot start another server.

@CharcoalG
Copy link

screenshot from 2015-05-27 11 17 15
on starting the $ nodemon server.js

What to do now?

@gichuwil
Copy link

Restart the server [Ctrl+C then nodemon server.js]

@CharcoalG
Copy link

No

@sivasubramanianp
Copy link

Check all things in render paths

EX:-
res.render

@sivasubramanianp
Copy link

Reinstall all dependencies

$ npm install

@VikramTiwari
Copy link
Member

Fixed.

@davidisaza21
Copy link

Thanks for the fix!

@igorg1312
Copy link

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
#1066 (comment)

csilvers added a commit to Khan/react-render-server that referenced this issue Jun 13, 2016
Summary:
We're seeing some errors where an instance can't be shut down cleanly
by google.  This is in the logs when that happens, according to
https://enterprise.google.com/supportcenter/managecases#Case/0016000000QWp9w/9115921
```
 app crashed - waiting for file changes before starting...
"FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory"
```

'waiting for file changes before starting' sure sounds like something
nodemon would say (linnovate/mean#1066
supports this).  My guess is google is killing the process, then
nodemon is trying to restart it, and trouble ensues.

So don't run nodemon, just depend on the normal google process for
monitoring health to do restarting when need be.

We still use nodemon in `dev` and `serve_local` modes because it's
super-useful there to notice file changes.

Test Plan: Fingers crossed

Reviewers: john, emily

Reviewed By: emily

Differential Revision: https://phabricator.khanacademy.org/D28109
@jingxingxingzhi
Copy link

Hi, I encountered with the same problem. How do you fix it? Could you describe it in detail? Thanks a lot!

@camilosanchez
Copy link

Thank you, I had the same problem, npm install fixed it

@Jipsian
Copy link

Jipsian commented Sep 29, 2016

I encountered with the same problem, but npm install didn't fixed the problem (I tryed a lot of times).

serverpb.txt

@Aimanizales
Copy link

Same fucking problem! Still happening after npm install. Nodemon piece of shit

@timelf123
Copy link
Contributor

@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

@sp1d3rino
Copy link

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

@Hardik21
Copy link

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.

@Shamel1
Copy link

Shamel1 commented Mar 18, 2017

I am having the same problem.
image

@Shamel1
Copy link

Shamel1 commented Mar 18, 2017

I need help..new to this.

@liorkesos
Copy link
Member

liorkesos commented Mar 19, 2017 via email

@praWINK
Copy link

praWINK commented Apr 8, 2017

I am also having this same issue...anyone solved this issue???

@RayanaAlencar
Copy link

Hi all,
I was with the same problem. The problem was that I forgot to start the mongo (sudo mongod) before run my server.

@Hardik21
Copy link

Hardik21 commented Apr 18, 2017

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

@kidkat
Copy link

kidkat commented May 22, 2017

@Jipsian did you found how to fix the problem ? Please can you help me 2 ?

@shubhamduttasd
Copy link

stiil now no solution for this??

@shubhamduttasd
Copy link

screenshot from 2017-06-16 16-05-24

@shubhamduttasd
Copy link

i am facing problem regarding this any solutn??

@timelf123
Copy link
Contributor

Upgrade your node version

@SunShinewyf
Copy link

I encountered with the same problem, but npm install didn't fixed the problem and my mongodb is running , don't know the reason.

@ParkMinsang
Copy link

I solved same problem. I didn't require. so I add require code and solved it.

@carlosAndress101
Copy link

esta es la solución del problema hay que instalar bien babel...

{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": true
}
}
]
]
}

@NouhaBHY
Copy link

fixed for me :
ctrl+c
then i restart pc

@karim12345-gif
Copy link

karim12345-gif commented Jul 26, 2021

what about pkill? (to kill all node connections)

pkill node

pkill node worked for me, thanks !

@Shachi-Priya
Copy link

"scripts": {
"start": "nodemon script.js"
}

here, after "nodemon" write file name which you want to run like I have written "script.js" in package.json.
I hope it will help you😊.

@Mostafasahim
Copy link

I think you just need to check over your code. it worked for me i had some code mistakes... and now that i looked over my code
everything is fine!👍

@boamatule
Copy link

If you are using mongodb create a new project on the Atlas mongoDb and use the new cluster's mongoUri.
Save the file
Restart nodemon.
This worked for me.

Also nodemon app crash can also be caused by an error in your code especially semicolons(;)

True! For me was it! Thanks :)

@moezbenrebah
Copy link

I got the same error, so the solution for me was grep all processes that node.js connect with, and then kill all these processes, restart my server, and voila everything went without error:
so on your terminal run this command:

netstat -lntp | grep node

your output will be something like that:

tcp        0      0 127.0.0.1:34919         0.0.0.0:*               LISTEN      14877/node          
tcp6       0      0 :::5000                 :::*                    LISTEN      15064/node          

and just using kill command + PID:

kill 14877

I hope that's will help

@FazlanFarook
Copy link

None of the solutio worked. Im still trying. Please update me if anyone have the latest solution

@karim12345-gif
Copy link

karim12345-gif commented Aug 24, 2021

None of the solutio worked. Im still trying. Please update me if anyone have the latest solution

did you try killing the server? ...i had the same issue ,but using (pkill node) worked with me .. maybe you should check if you have any minor mistakes in the code or so !

hope this helps!

@xuanchinh97
Copy link

app.listen(newport)

@jose1574
Copy link

jose1574 commented Sep 4, 2021

hola.... estoy empezando a programar y estuve buscando un buen rato la solución, tenia un problema en mis rutas, me faltaba exportar en modulo para poder cargarlo en mi index.js espero le ayude a alguien.

@EIOTAFRICA
Copy link

options retrywrites , w are not supported

@zamio1703
Copy link

instale express
npm install express
y cambie el numero de puerto 3000 a 3001

@FazlanFarook
Copy link

None of the solutio worked. Im still trying. Please update me if anyone have the latest solution

did you try killing the server? ...i had the same issue ,but using (pkill node) worked with me .. maybe you should check if you have any minor mistakes in the code or so !

hope this helps!

thank you for your time, I had a memory issue

@yana1306137
Copy link

Solve by change node / nvm with version 10.0.0

nvm install 10.0.0
nvm use 10.0.0
and running....

@HanPac
Copy link

HanPac commented Jan 20, 2022

if you are using EJS, TypeScript and Node
npm install -g ts-node

@A1eeex
Copy link

A1eeex commented Jan 26, 2022

image

The error may be due to an incorrect format in postman.

@felipehimself
Copy link

I had the same problem and the issue was I hadn't imported a route correctly:

I was importing: ' import postRoutes from './routes/posts'

I fixed it by importing including .js at the end:

import postRoutes from './routes/posts.js'

@Vimal200
Copy link

events.js:292
throw er; // Unhandled 'error' event
^

Error: listen EACCES: permission denied 2000;
at Server.setupListenHandle [as _listen2] (net.js:1301:21)
at listenInCluster (net.js:1366:12)
at Server.listen (net.js:1463:5)
at Function.listen (C:\Users\Admin\Desktop\project\mernbackend\node_modules\express\lib\application.js:618:24)
at Object. (C:\Users\Admin\Desktop\project\mernbackend\src\index.server.js:7:5)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'EACCES',
errno: -4092,
syscall: 'listen',
address: '2000;',
port: -1
}

Can any one help me in solving this problem.... I have tried everything as above but still I'm getting this error.

@anegri93
Copy link

Hi, solved with:
npm i -g @babel/node -D

@helder-hanka
Copy link

Capture d’écran 2022-06-13 à 23 23 12

Capture d’écran 2022-06-13 à 23 27 02

Capture d’écran 2022-06-13 à 23 29 11

Capture d’écran 2022-06-14 à 01 18 55

Capture d’écran 2022-06-14 à 01 19 15

@helder-hanka
Copy link

Hello everyone,
I did a test and created an error on my input line 9 of my Postman, to see how my server handles this,
but my app crash because of my express-valitor that I misplaced on my index.js.

if anyone can help me please.
Thanks in advance

@Stuti2803
Copy link

image

Everytime I'm opening my server, I'm getting this error. Please someone help.

@Stuti2803
Copy link

image

Everytime I'm opening my server, I'm getting this error. Please someone help.

image
This is my simple code. Please help out.

@Santhoshdevmj
Copy link

screenshot from 2015-05-27 11 17 15 on starting the $ nodemon server.js

What to do now?

I got same when i'm run node application
apt install npm
apt-get update

use this command

@tiaabboudsync
Copy link

Capture d’écran 2022-06-13 à 23 23 12 Capture d’écran 2022-06-13 à 23 27 02 Capture d’écran 2022-06-13 à 23 29 11 Capture d’écran 2022-06-14 à 01 18 55 Capture d’écran 2022-06-14 à 01 19 15

did you fix the error? i have the same error

@Ibrahim-krimi
Copy link

Pour moi j ai juste tuer tous les processus Node avec pkill node et apres j ai relance le server et ça fonction mais apres ça depend parfois c est a cause de manque de mongoose ..

@TomsH1
Copy link

TomsH1 commented Dec 2, 2022

I was dealing with this error for a few days, the compile time errors were not showing up and the only thing I was getting on the console is the nice message: _[nodemon] app crashed - waiting for file changes before starting..._ with no further details. In my case I corrected it by removing Type: "modules" from the package.json and using require, now I see the error detail in the console

@Najmuldeen
Copy link

There is a server that's already running, so you cannot start another server.

you are awesome man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests