licensee.js: Using "ignore" lead to UnhandledPromiseRejection

I’ve got an error “UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘toLowerCase’ of undefined” trying to use “ignore” filter. (licensee\index.js:327:17)

It caused by package node_modules\\@svgr\\webpack\\node_modules\\@babel\\plugin-proposal-private-methods. This package results in empty object inside tree.package in resultForPackage func.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 18 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Not against reading through links of all kinds, assuming there’s a reasonable abstraction for doing so. We just don’t want this repo becoming mostly about filesystem quirks.

Yep, it was the symlink that triggered this error for us. This seems to work okay when node_modules is not a symlink.

@ljharb I have not yet been able to get this to reproduce locally, even with the same node/npm versions.

Here’s the object when result.name is falsy:

{
  name: undefined,
  version: '',
  license: undefined,
  author: undefined,
  contributors: undefined,
  repository: undefined,
  homepage: undefined,
  parent: null,
  path: '/path/to/repo-cache-dir'
}

We do have a package.json file at the root, but it has a name field, among other things.

No, @babel is a scope, not a package - but @babel/core certainly is a package, and if that lacks a package.json that suggests your yarn install didn’t work properly.