Skip to content
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

npm ERR! code ELSPROBLEMS #990

Open
richardlau opened this issue Sep 29, 2023 · 7 comments
Open

npm ERR! code ELSPROBLEMS #990

richardlau opened this issue Sep 29, 2023 · 7 comments
Assignees

Comments

@richardlau
Copy link
Member

richardlau commented Sep 29, 2023

I've noticed the "Node.js CI" badge on the README is red (failing):
image

Clicking on the badge leads to https://github.com/nodejs/citgm/actions?query=workflow%3A%22Node.js+CI%22 and the most recent runs on main are green:
image
Clicking on one of the green builds shows annotations even though the subjobs are all green:
e.g. https://github.com/nodejs/citgm/actions/runs/6347014207

image

Clicking on one of the annotations shows that npm is returning exit code 1 in the "Print installed dependencies" step.
e.g. https://github.com/nodejs/citgm/actions/runs/6347014207/job/17241378354#step:12:991

Run npm ls --all
npm ERR! code ELSPROBLEMS
npm ERR! invalid: [email protected] /home/runner/work/citgm/citgm/node_modules/tap/node_modules/wrap-ansi
[email protected] /home/runner/work/citgm/citgm

├── [email protected]
npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-09-29T04_03_07_033Z-debug-0.log
...
Error: Process completed with exit code 1.
@richardlau
Copy link
Member Author

It looks like bd92122 was the commit that introduced the problem.

bd92122 is #966 (cc @anonrig) but AFAICT the problem didn't occur for the commits in that PR (a merge issue?).

@anonrig
Copy link
Member

anonrig commented Sep 29, 2023

@richardlau Can you reproduce the error locally?

@richardlau
Copy link
Member Author

@anonrig I haven't tried.

@anonrig anonrig self-assigned this Sep 29, 2023
@anonrig
Copy link
Member

anonrig commented Sep 29, 2023

It seems to be the issue caused by pkgjs/action - https://github.com/pkgjs/action/blob/main/package.json#L8.

npm test || exit 1 could be the reason.

@isaacs did node-tap change it's exit code?

@ljharb
Copy link
Member

ljharb commented Sep 29, 2023

npm ls is a good thing to check, and fails when the dep graph is invalid. Extraneous or missing deps can cause it. It’s best to fix the underlying problem.

@targos
Copy link
Member

targos commented Oct 2, 2023

This seems like an npm tree optimization bug. node_modules/tap/node_modules/cliui wants wrap-ansi@^7.0.0, but npm installed [email protected] in node_modules/tap/node_modules/wrap-ansi.

I opened npm/cli#6856

@anonrig
Copy link
Member

anonrig commented Oct 2, 2023

Should we disable npm ls --all command until it's fixed upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants