내용으로 건너뛰기

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 )

질문됨 3년 전1.6천회 조회

1개 답변
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.

AWS

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠