npm-check
npm-check copied to clipboard
Memory leak?
Running npm-check
reserved all the available RAM + ~15 GB of swap. Running this freezes my computer within seconds.
Hmmm, this may relates to depcheck.
@jrasanen does it still happen if you use --skip-unused
or -u
?
Works much better with that flag, it only froze for couple of minutes. After consuming ram it takes swap around 15-25 GB. (Without this flag the swap file just kept growing until system freeze)
This is while system was unresponsive (with --skip-unused)
After waiting 2~3 minutes (with --skip-unused)
Project's package.json
{
"name": "redacted",
"description": "redacted",
"engines": {
"node": "5.8.0"
},
"scripts": {
"postinstall": "gulp build"
},
"dependencies": {
"babel-core": "^6.7.0",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babelify": "^7.2.0",
"bootstrap": "^4.0.0-alpha.2",
"bootstrap-datepicker": "^1.6.0",
"browser-sync": "~2.11.1",
"browserify": "^13.0.0",
"browserify-shim": "^3.8.12",
"coffeeify": "~2.0.1",
"del": "^2.2.0",
"font-awesome": "^4.5.0",
"gulp": "^3.8.7",
"gulp-autoprefixer": "^3.1.0",
"gulp-changed": "^1.3.0",
"gulp-clean-css": "^2.0.3",
"gulp-filesize": "0.0.6",
"gulp-imagemin": "^2.4.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.0",
"gulp-rev": "^7.0.0",
"gulp-rev-collector": "^1.0.2",
"gulp-sass": "^2.0.4",
"gulp-sequence": "^0.4.5",
"gulp-sourcemaps": "^1.2.8",
"gulp-swig": "^0.8.0",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.1.1",
"jeet": "^6.1.2",
"lodash": "^4.6.1",
"merge-stream": "^1.0.0",
"normalize.css": "^3.0.3",
"phantomcss": "^1.0.0",
"pretty-hrtime": "~1.0.2",
"require-dir": "^0.3.0",
"responsively-lazy": "^1.2.1",
"timepicker": "^1.8.10",
"unveil": "^0.1.13",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0",
"webpack": "^1.12.14"
},
"private": true
}
I've added a concurrency check so that it only checks the registry once per cpu. Can you try with --skip-unused
again and let us know if he helps?
@dylang npm-check -u -s
use close to 8 GB memory in my case.
could never get npm-check to run (with or without -s
) with following package.json:
{
"name": "ooz",
"version": "1.0.0",
"private": true,
"devDependencies": {
"babel-cli": "^6.6.5",
"babel-preset-es2015": "^6.6.0",
"babelify": "^7.2.0",
"browserify": "^13.0.0",
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
"config-browserify": "^1.0.5",
"cross-env": "^1.0.7",
"env-test": "^1.0.0",
"envify": "^3.4.0",
"eslint": "^2.6.0",
"growl": "^1.9.2",
"livereload": "^0.4.1",
"migrate": "^0.2.2",
"mocha": "^2.4.5",
"nodemon": "^1.9.1",
"npm-check": "^5.1.1",
"npm-run-all": "^1.7.0",
"stringify": "^5.1.0",
"stylus": "^0.54.2",
"uglify-js": "^2.6.2",
"watchify": "^3.7.0"
},
"dependencies": {
"angular": "^1.5.3",
"angular-moment": "^1.0.0-beta.5",
"angular-socket-io": "^0.7.0",
"angular-ui-router": "^1.0.0-alpha.3",
"babel-register": "^6.7.2",
"bluebird": "^3.3.4",
"browserify-ngannotate": "^2.0.0",
"bunyan": "^1.8.0",
"busboy": "^0.2.13",
"chalk": "^1.1.3",
"columnify": "^1.5.4",
"commander": "^2.9.0",
"config": "^1.19.0",
"connect-redis": "^3.0.2",
"convict": "^1.2.0",
"debug": "^2.2.0",
"error": "^7.0.2",
"express": "^4.13.4",
"express-session": "^1.13.0",
"fsp": "^0.1.2",
"inquirer-promise": "0.0.3",
"insert-css": "^0.2.0",
"jquery": "^2.2.2",
"lodash": "^4.7.0",
"mime": "^1.3.4",
"mongoose": "^4.4.11",
"mongoose-timestamp": "^0.5.0",
"ng-file-upload": "^12.0.4",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"redis": "^2.6.0-1",
"serve-static": "^1.10.2",
"socket.io": "^1.4.5",
"socket.io-client": "^1.4.5",
"toml": "^2.3.0",
"uuid": "^2.0.1"
},
"optionalDependencies": {
"hiredis": "^0.4.1"
}
}
How can I help you debugging?
+1: Uses 16GB almost immediately for my package.json of about 60 libs.
same here on linux, unusable!