cdklabs / cdklabs/publib

Npm not using ~/.npmrc

Open
#694 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
61
Forks
24
Avg merge
6h 45m
Merged PRs (30d)
14

Description

I'd like to use `npx publib-npm` in the pipeline with AWS CodeArtifact, however, it is not using credentials from ~/.npmrc

```aws codeartifact login --tool npm --repository commons --domain xxx --domain-owner xxx --region us-east-1 --profile xxx
Successfully configured npm to use AWS CodeArtifact repository https://xxx-xxx.d.codeartifact.us-east-1.amazonaws.com/npm/lib/
Login expires in 12 hours at 2023-03-22 23:06:25-04:00
```

Then error with publish

```
npx publib-npm
NPM_TOKEN is required
```

Native npm publish works properly, using auth from ~/.npmrc
`npm publish dist/js/lib@${version}.jsii.tgz`

With NPM_TOKEN and NPM_REGISTRY variables for the CodeArtifact registry, it errors out with

````
npx publib-npm

Unable to locate credentials. You can configure credentials by running "aws configure".
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.