-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using "ignore" lead to UnhandledPromiseRejection #70
Comments
Can you provide the entire stack trace? |
Sure
|
One more thing, I work on Windows PC, but my colleague on Mac PC does not have this issue |
Line 268 accesses the Line 268 in 62f4548
Is there a |
The .bin folder isn’t a package, it’s where package binaries go. |
P.S. And I have tried |
No, |
I am currently trying to update from v8.2.0 to v9.0.0 and have run into what appears to be this issue as well. I have been unable to reproduce it when running locally (Mac), but when it runs in our CI environment (Linux) it fails like this.
|
That line comes from https://github.com/jslicense/licensee.js/blob/main/index.js#L154, which suggests it's trying to install a package that has no "name" field. @lencioni if your local node/npm version matches what's in CI, does it reproduce locally? Alternatively, can you patch the file in CI to log out the |
@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 {
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 |
I am realizing that our |
Yep, it was the symlink that triggered this error for us. This seems to work okay when |
Indeed, I've seen lots of issues caused by things attempting to symlink node_modules. If there's something in licensee that could help (adding an extra |
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. |
I have tried to reproduce this locally on my mac by moving my node_modules somewhere and symlinking it into my project, but I can't seem to make it trigger this issue. This makes debugging this pretty annoying. In my case, the problematic "dependency" seems to be pointing to the root directory that contains the actual copy of I looked through the code a bit and I'm not entirely sure where the root of the issue lies. I suspect it could lie somewhere in the Arborist code, but I wasn't able to figure out exactly where. I noticed they have a v6 release out, so it might be worth at least trying to update? I discovered a filterPackages: (arboristLinks) => {
return arboristLinks.filter((arboristLink) => {
if (arboristLink.package.name == null) {
return false;
}
return true;
});
}, In this process, I discovered that when the I think it might make sense to have licensee detect a Lines 40 to 42 in 42aae52
What do you think about that? |
I'd like to separate the linked Would like to:
From there we should be able to better diagnose. |
Hoping to add a test case that will help us resolve some of the issues explored in jslicense#70
I've added a test case in #79 but I'm not sure how to see it run and tell if it reproduces the error. |
Hoping to add a test case that will help us resolve some of the issues explored in jslicense#70
Hoping to add a test case that will help us resolve some of the issues explored in jslicense#70
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 insidetree.package
inresultForPackage
func.The text was updated successfully, but these errors were encountered: