iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📦

Installing only specific npm packages from AWS CodeArtifact

に公開

The following site introduced a method for installing only specific packages from CodeArtifact, but I found that this can be achieved by slightly modifying the login command without manually editing $HOME/.npmrc, so I'm documenting it here.

https://inokara.hateblo.jp/entry/2021/12/04/115551

Simply add the --namespace @mynamespace option to the login command.

$ aws codeartifact login --tool npm --domain my_domain --domain-owner 111122223333 --repository my_repo --namespace @mynamespace

Reference

https://docs.aws.amazon.com/ja_jp/codeartifact/latest/ug/codeartifact-concepts.html#welcome-concepts-package-namespace

Discussion