Skip to content

Cannot read property 'indexOf' of undefined #8

@Svish

Description

@Svish

With following script defined in package.json:

"lint:outdated": "assert-outdated-npm-modules --max-warnings 0 --ignore-pre-releases",
  1. Ran lint:outdated and got a list of outdated dependencies (as expected)
  2. Updated package.json with new versions
  3. Ran lint:outdated again, and got following errror (not expected):
C:\dev\project>npm run lint:outdated

> project@0.1.0 lint:outdated C:\dev\project
> assert-outdated-npm-modules --max-warnings 0 --ignore-pre-releases

TypeError: Cannot read property 'indexOf' of undefined
    at C:\dev\project\node_modules\assert-outdated\outdated.js:23:26
    at Array.filter (<anonymous>)
    at filterDependencies (C:\dev\project\node_modules\assert-outdated\outdated.js:22:49)
    at C:\dev\project\node_modules\assert-outdated\outdated.js:62:27
  1. Ran npm install to see if that helped
  2. Ran lint:outdated once again, and got no errors (as expected)

Seems when I update package.json, but don't run npm install, then outdated.js crashes for some reason?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions