question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm audit fails with 500 server error on nightly build

See original GitHub issue

Your Environment

  • verdaccio version: v6.0.0-6-next.17
  • node version: 14.17.2 & 16.3.0 locally, 14.16.1 inside of the container
  • package manager: npm@6 & npm@7
  • os: linux
  • platform: docker (nightly-master@f48b67b2111e)

Describe the bug

npm audit fails with 500 Internal Server Error.

npm 7.19.1 & node 16.3.0:

image

npm 6.14.13 & node 14.17.2`:

image

Container logs:

image

To Reproduce

docker run --rm -p 4873:4873 --name verdaccio -d verdaccio/verdaccio:nightly-master@sha256:f48b67b2111e90eacb030c40d89e677e3aab60ce807b041aa8cf1f39af39d0bb
mkdir verdaccio-audit-test
cd verdaccio-audit-test
npm init -y
echo 'registry=http://localhost:4873' >> .npmrc
npm install lodash
npm audit

Expected behavior

npm audit should work.

Screenshots, server logs, package manager log

See above.

Configuration File (cat ~/.config/verdaccio/config.yaml)

Default docker image configuration.

Environment information

Environment Info:
  System:
    OS: Linux 5.8 Alpine Linux undefined
    CPU: (16) x64 AMD Ryzen 7 1700 Eight-Core Processor
  Binaries:
    npm: 6.14.12 - /usr/local/bin/npm

Debugging output

See logs above (I couldn’t get the extensive logging output to work, sorry).

Contribute to Verdaccio

  • I’m willing to fix this bug 🥇

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
simon-lorenzcommented, Jul 16, 2021

I poked around a little bit and found that this line should be headers.host = 'registry.npmjs.org' without https://. After that, the ssl error disappears, but a 400 client error is returned instead. I don’t know how to debug any further at this point.

Also, I think the plugin ssl configuration is not respected because this if condition always fails if config.strict_ssl is false and therefore no https agent with rejectUnauthorized: false can be created.

1reaction
DanielRufcommented, Jul 16, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - npm audit fails with 500 server error on nightly build -
Your Environment verdaccio version: v6. · Describe the bug. npm audit fails with 500 Internal Server Error . · To Reproduce · Expected...
Read more >
500 Internal Server Error" suddenly, after working fine until now
Use nodist (if on windows) with node 8.16, reinstalling stencil fresh. after installing stencil & setting python version etc, run npm update and...
Read more >
Yarn audit returns error 500 · Issue #6658 - GitHub
json or even just the dependencies and devDependencies . I'd like to capture the network traffic from npm and see if theirs is...
Read more >
500 Internal Server Error: npm@latest - Stack Overflow
500 error indicates issue with the server. Yesterday I was facing this issue whenever I tried installing packages with npm.
Read more >
HTTP 500 Internal Server Error: What It Means & How to Fix It
1. Refresh the page. ... This might seem obvious, but if it's a temporary loading issue, you might find success if you refresh...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found