Switching to Node16, CodeArtifact does not authenticate with npm 9

0

We have been using the following standard way to authenticate to CodeArtifact:

aws codeartifact login --tool npm --repository MyRepository --domain MyDomain --domain-owner 123456789 --query authorizationToken --output text --duration-seconds 43200

Works fine for : node v14.20.0 (npm v6.14.17)

Successfully configured npm to use AWS CodeArtifact repository https://nems-123456789.d.codeartifact.eu-central-1.amazonaws.com/npm/MyRepository/ Login expires in 12 hours at 2023-05-11 01:56:58+02:00

Switching with nvm for: node v16.20.0 (npm v9.6.6)

Gives the following error:

Command '['npm', 'config', 'set', '//nems-123456789.d.codeartifact.eu-central-1.amazonaws.com/npm/*MyRepository/:always-auth', 'true']' returned non-zero exit status 1.

Only after downgrading to npm v6.14.17 am i able to authenticate, does npm version 9 does not work with Codeartifact or am i missing something?

EDIT (Note: was able to authenticate until version npm@8.19.4 )

preguntada hace un año990 visualizaciones
1 Respuesta
1

Hi,

You likely have an outdated version of the AWS CLI as this issue was fixed in https://github.com/aws/aws-cli/pull/7468. Update to at least AWS CLIv2 2.9.5 or CLIv1 1.27.23.

profile pictureAWS
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas