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
- Add test case for symlinked node_modules with ignore Hoping to add a test case that will help us resolve some of the issues explored in https://github.com/jslicense/licensee.js/issues/70 — committed to lencioni/licensee.js by lencioni 2 years ago
- Add test case for symlinked node_modules with ignore Hoping to add a test case that will help us resolve some of the issues explored in https://github.com/jslicense/licensee.js/issues/70 — committed to lencioni/licensee.js by lencioni 2 years ago
- [Tests] Add test case for symlinked node_modules with ignore Hoping to add a test case that will help us resolve some of the issues explored in https://github.com/jslicense/licensee.js/issues/70 — committed to lencioni/licensee.js by lencioni 2 years ago
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:We do have a
package.json
file at the root, but it has aname
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.