Skip to content

[BUG] Cannot read properties of null (reading 'isWorkspace') #5129

@ThisIsMissEm

Description

@ThisIsMissEm

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When doing npm ls --include-workspace-root --workspace eslint-config-react @babel/polyfill in https://github.com/inrupt/javascript-style-configs I receive the following error:

38 verbose stack TypeError: Cannot read properties of null (reading 'isWorkspace')
38 verbose stack     at filterBySelectedWorkspaces (~/.fnm/node-versions/v16.13.1/installation/lib/node_modules/npm/lib/commands/ls.js:95:23)
38 verbose stack     at Array.filter (<anonymous>)
38 verbose stack     at getChildren (~/.fnm/node-versions/v16.13.1/installation/lib/node_modules/npm/lib/commands/ls.js:136:14)
38 verbose stack     at kidNodes (~/.fnm/node-versions/v16.13.1/installation/lib/node_modules/npm/node_modules/treeverse/lib/breadth.js:52:18)
38 verbose stack     at ~/.fnm/node-versions/v16.13.1/installation/lib/node_modules/npm/node_modules/treeverse/lib/breadth.js:41:16

I believe this may be related to #5007 and the fix described in the latest comment.

Expected Behavior

npm ls should find the given package without error, if the package is used.

Steps To Reproduce

See above, using npm 8.13.x and node 16.13.x

Environment

  • npm: 8.13.2
  • Node.js: 16.13.1
  • OS Name: MacOS latest
  • System Model Name: MacOS
  • npm config: no additional npm config.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions