raineorshine / npm-check-updates

Find newer versions of package dependencies than what your package.json allows
Other
9.44k stars 329 forks source link

ncu doesn't work sometimes. #1274

Closed sweatpotato13 closed 1 year ago

sweatpotato13 commented 1 year ago

Steps to Reproduce

Dependencies:

    "dependencies": {
        "@babel/core": "^7.20.2",
        "@elastic/elasticsearch": "^8.5.0",
        "@nestjs/common": "^9.2.0",
        "@nestjs/config": "^2.2.0",
        "@nestjs/core": "^9.2.0",
        "@nestjs/cqrs": "^9.0.1",
        "@nestjs/elasticsearch": "^9.0.0",
        "@nestjs/passport": "^9.0.0",
        "@nestjs/platform-express": "^9.2.0",
        "@nestjs/swagger": "^6.1.3",
        "@nestjs/typeorm": "8.0.4",
        "body-parser": "^1.20.1",
        "bs58": "^5.0.0",
        "class-transformer": "^0.5.1",
        "class-validator": "^0.14.0",
        "cls-rtracer": "^2.6.2",
        "cross-fetch": "^3.1.5",
        "dotenv": "^16.0.3",
        "express-rate-limit": "^6.7.0",
        "helmet": "^6.0.0",
        "ioredis": "^5.2.4",
        "jsonwebtoken": "^9.0.0",
        "moment": "^2.29.4",
        "morgan": "^1.10.0",
        "nest-winston": "^1.8.0",
        "nestia-helper": "^3.1.10",
        "node-eventstore-client": "^21.10.0",
        "object-assign": "^4.1.1",
        "passport": "^0.6.0",
        "passport-google-oauth20": "^2.0.0",
        "pg": "^8.8.0",
        "reflect-metadata": "^0.1.13",
        "rimraf": "^3.0.2",
        "rxjs": "^7.5.7",
        "tsconfig-paths": "^4.1.0",
        "typedi": "^0.10.0",
        "typeorm": "0.2.45",
        "typeorm-transactional-cls-hooked": "^0.1.21",
        "winston": "^3.8.2",
        "winston-mongodb": "^5.1.0"
    },
    "devDependencies": {
        "@commitlint/cli": "^17.3.0",
        "@commitlint/config-conventional": "^17.3.0",
        "@nestjs/cli": "^9.1.5",
        "@nestjs/schematics": "^9.0.3",
        "@nestjs/testing": "^9.2.0",
        "@types/helmet": "^4.0.0",
        "@types/jest": "29.2.3",
        "@types/node": "^18.11.9",
        "@types/passport": "^1.0.11",
        "@types/passport-google-oauth20": "^2.0.11",
        "@types/xml2js": "^0.4.11",
        "@typescript-eslint/eslint-plugin": "^5.44.0",
        "@typescript-eslint/parser": "^5.44.0",
        "eslint": "^8.28.0",
        "eslint-config-prettier": "^8.5.0",
        "eslint-plugin-import": "^2.26.0",
        "eslint-plugin-security": "^1.5.0",
        "eslint-plugin-simple-import-sort": "^8.0.0",
        "git-branch-is": "^4.0.0",
        "husky": "^8.0.2",
        "jest": "29.3.1",
        "lint-staged": "^13.0.4",
        "nestia": "^3.1.6",
        "node-mocks-http": "^1.12.1",
        "prettier": "^2.8.0",
        "standard-version": "^9.5.0",
        "supertest": "^6.3.1",
        "ts-jest": "29.0.3",
        "ts-loader": "^9.4.1",
        "ts-node": "^10.9.1",
        "ttypescript": "^1.5.13",
        "typescript": "^4.9.3"
    },

Steps:

run ncu -u

Using ncu 16.4.1 and Yarn 3.2.0

Update: ncu -t newest -u is work well, but ncu -t latest -u is also stuck

Current Behavior

Stuck here

ss

Expected Behavior

Run nicely

raineorshine commented 1 year ago

I've tried out your dependencies and ncu finishes every time for me, so it is probably your internet connection. It takes about 2.2 seconds to complete on my connection.

Here are some ideas that you could use to work around a slow/intermittent internet connection:

sweatpotato13 commented 1 year ago

@raineorshine ncu -u --dep dev --filter "@*" && ncu -u --dep dev --reject "@*" && ncu -u --dep prod --filter "@*" && ncu -u --dep prod --reject "@*" is work like a charm

Thanks 👍