NPM Certificate Issue?

One of my jobs started failing last night on a step that installs a dependency via NPM on a Linux machine. Is anyone else experiencing this?

#!/bin/bash -eo pipefail
npm install -g detox-cli
[..................] - idealTree:lib: sill idealTree buildDeps[[K..................] - idealTree:lib: sill idealTree buildDepsnpm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/detox-cli failed, reason: unable to get local issuer certificate

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2021-03-06T16_01_38_913Z-debug.log


Exited with code exit status 1
CircleCI received exit code 1

Hi @cmroussel,

Welcome! Are you using a CircleCI docker image? if so, can you please let me know specifically which docker image you are using so I can inspect issuer certificates?

Please feel free to also share your config.yml file, a build link and package.json file if you’d like. This will help me recreate the issue locally and get a better understanding of what’s going on.

You can also try debugging with SSH. This feature allows you to SSH into your container to investigate the build environment.

I am experiencing the same problem, using machine executor:

https://app.circleci.com/pipelines/github/vnatures/nest-next-monorepo/334/workflows/1c2bc3c2-9263-4f97-97a2-3ce25bd1e431/jobs/1884/parallel-runs/0/steps/0-108?invite=true

I investigated and found the issue. It’s only on the android machine image preview for me and I filed a report there: Global NPM Config removes the default NPM CA · Issue #14 · CircleCI-Public/android-image-preview-docs · GitHub.

Workaround is to add npm -g config delete ca

This issue is now fixed for the android machine image preview: Global NPM Config removes the default NPM CA · Issue #14 · CircleCI-Public/android-image-preview-docs · GitHub

@amir-arad The error in the “ubuntu-2004:202101-01” image seems more transient as I am not able to reproduce it. Are you still encountering it?

I’ve added npm config -g delete ca to my job, for now it seemed to have fixed it

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.