Skip to content

Npm not using ~/.npmrc #694

@OperationalFallacy

Description

@OperationalFallacy

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

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".
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions