Npm-check-updates: Cannot read property 'versions' of undefined

Created on 6 Nov 2019  路  6Comments  路  Source: raineorshine/npm-check-updates

  • [x] I have read the list of known issues before filing this issue.
  • [x] I have searched for similiar issues before filing this issue.

  • node version: 13.0.1

  • npm version: 6.13.0
  • npm-check-updates version: 3.2.0

Running ncu -n results in the following error when scanning one of my projects:

C:\Users\fegit1\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:392
    throw err;
    ^

TypeError: Cannot read property 'versions' of undefined
    at C:\Users\fegit1\AppData\Roaming\npm\node_modules\npm-check-updates\lib\package-managers\npm.js:226:64
    at async Promise.all (index 22)
    at async getAnalysis (C:\Users\fegit1\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:438:30)
    at async Object.run (C:\Users\fegit1\AppData\Roaming\npm\node_modules\npm-check-updates\lib\npm-check-updates.js:444:12)

Running ncu without the -n argument runs fine.

Doesn't happen on all of my projects, only some.

The previous version v3.1.26 does not have this issue.

bug

Most helpful comment

@raineorshine My PR, my regression, my fix

All 6 comments

Thank you for reporting! Can you please narrow it down to which dependency(ies) is causing the issue? Once you find it, please post the dependency name and version specified in your package.json so I can reproduce.

@raineorshine I just found the issue. It's a git repo dependency.

Run:
npm init (yes to all)
npm install github:HitomiTenshi/pouchdb-browser --save
ncu -n

@webdevium It looks like there is a regression from your PR. Could you look into this?

@raineorshine My PR, my regression, my fix

Thanks!

Published in v3.2.1

@HitomiTenshi Did this fix the issue?

@raineorshine Yes it did, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eddieedease picture eddieedease  路  4Comments

evgenyrodionov picture evgenyrodionov  路  4Comments

frankTadlip picture frankTadlip  路  4Comments

nicksarafa picture nicksarafa  路  6Comments

daveisfera picture daveisfera  路  7Comments