You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
license-ls does not work with npm@7 and hangs forever
Using [email protected] with npm 7.19.0 does not work: it produces no output and does not terminate.
How to reproduce?
Simply run license-ls with npm@latest
Details
7.19.0
...\license-ls> set DEBUG=license-ls
...\license-ls> node cli.js --depth=0 --prod > NUL
- Analyzing license-ls Got these options: [
"--depth=0",
"--prod=true",
"--production=true",
"--include=id,name,version,license,repository,author,homepage,dependencyLevel",
"--csv=[object Object]",
"--table=[object Object]",
"--xml=[object Object]"
] +0ms
- Analyzing license-ls The `node ls` command exited with the following code: 0 +619ms
license-ls Total paths found: 1 +0ms
license-ls Dependency paths: [ '7.19.0' ] +0ms
(node:16820) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, lstat '...\license-ls\7.19.0'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16820) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To term
inate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16820) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/ Analyzing
The spinner before Analyzing keeps spinning forever and you have to termine license-ls manually.
Error causes
The cuplrit seems to be that npm 7 changed the argument handling drastically:
When license-ls is started with [email protected]npmList(...) returns ['7.19.0'] as package list.
This in turn leads to a Error: ENOENT which is not handled and the spinner keeps spinning.
(The hang only occurs in an interactive TTY as ora does not animate the spinners when license-ls is started by other means)
The text was updated successfully, but these errors were encountered:
license-ls does not work with npm@7 and hangs forever
Using [email protected] with npm 7.19.0 does not work: it produces no output and does not terminate.
How to reproduce?
Simply run
license-ls
with npm@latestDetails
The spinner before Analyzing keeps spinning forever and you have to termine license-ls manually.
Error causes
The cuplrit seems to be that npm 7 changed the argument handling drastically:
When
license-ls
is started with [email protected]npmList(...)
returns['7.19.0']
as package list.This in turn leads to a
Error: ENOENT
which is not handled and the spinner keeps spinning.(The hang only occurs in an interactive TTY as
ora
does not animate the spinners whenlicense-ls
is started by other means)The text was updated successfully, but these errors were encountered: