-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 crashes with Cannot read property 'map' of undefined
#1459
Comments
Node 11 same issue :( |
same here with macOS 10.13.6 |
Guys, instead of posting new issues: Just read/search for already open/closed ones... |
nodemon dependencies pstree.remy |
Cannot read property 'map' of undefined
Acknowledging this. I've been trying to work on a fix, but work life and personal life has been keeping me away from coding on this. The issue is in https://github.com/remy/pstree - and although I fixed the core of this issue, there's a new issue that leaves processes running in the background instead of killing them (which is exactly what pstree intends to address). The tests pass fine in a mac environment (my dev machine), but not in linux - which travis runs in. I am able to replicate with docker (this branch: https://github.com/remy/nodemon/tree/fix/new-pstree ) but I don't know what's leaving the process in the background (it's definitely that |
Well, I deleted the folder and created everything and it workwd okay... |
the same issue, |
I'm having a similar issue - different error message but nodemon is crashing upon attempting to restart.
Is this related or should I start another issue? |
Experiencing the same problem that nodemon will report EADDRINUSE when reloading a watched file when run in a linux environment via Docker. In my case, I use the latest node-alpine v10.13.0 image. -act |
@remy Can you please lock the nodemon dependency on pstree back to 1.1.0 ? Until you can release a 1.1.3 that fixes these issues? |
Fixed and deployed in latest release (going live right now) |
Thanks for raising this issue, and hopefully you're happy with @remy's fix. If you'd like to support this project, you can do just that through the open collective https://opencollective.com/nodemon/donate or at the very least, starring this project would give me @remy a little smile ❤️ |
A fix to avoid 'crashes with 'Cannot read property 'map' of undefined' remy/nodemon#1459
Only One Solutiion try this: "npm cache clean --force" |
Error: listen EADDRINUSE: address already in use :::3000 |
How to fix this?? |
Try this "npm cache clean --force" |
I know it seems silly but I think it could be a problem with maximum number of watched files in OS. I faced the same problem and tried all above solutions, none works for me. but then I understand sometimes (in some runs) nodemon complains about maximum file watch. so I ignored some directories and now it does not have that problem anymore. |
Try to use (npm install nodemon). |
internal/modules/cjs/loader.js:968 Error: Cannot find module 'C:\Users\omnamashivaya\OneDrive\Desktop\Wiki_API\index.js' |
how fix this |
pls I need help |
npm ERR! code EACCES npm ERR! A complete log of this run can be found in: CMD : sudo npm install -g nodemon After using the above command, it worked just fine. |
nodemon -v
:"^1.18.6"
node -v
:v10.13.0
ubunutu 18.04
npm start
in package.json I have "start": "nodemon"
Expected behaviour
It should run and rerun on changes
Actual behaviour
It errors each time I try to save my changes and gives this
/home/user/projects/mongodb-todo/node_modules/nodemon/lib/monitor/run.js:336
spawn('kill', ['-s', sig, child.pid].concat(kids.map(p => p.PID)))
^
TypeError: Cannot read property 'map' of undefined
at /home/user/projects/mongodb-todo/node_modules/nodemon/lib/monitor/run.js:336:58
at /home/user/projects/mongodb-todo/node_modules/pstree.remy/lib/tree.js:53:11
at ChildProcess.onClose (/home/user/projects/mongodb-todo/node_modules/pstree.remy/lib/tree.js:80:9)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mongodb-todo@1.0.0 start:
nodemon
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mongodb-todo@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-11-22T12_10_04_952Z-debug.log
Steps to reproduce
install express, morgan, nodemon.
run npm start
then save changes in app.js
Here is package.json
{
"name": "mongodb-todo",
"version": "1.0.0",
"description": "",
"main": "./app.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "nodemon"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.4",
"morgan": "^1.9.1",
"nodemon": "^1.18.6"
}
}
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: