I have a private package in a CodeArtifact repository but it will not download/install.
I have tried installing from a package.json and copying and pasting the suggested command from AWS dashboard; npm install @myproject/authentication@1.0.93
.
I am getting an error
npm ERR! code E404
npm ERR! 404 Not Found - GET https://company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/@myproject%2fauthentication - Repository not found.
npm ERR! 404
npm ERR! 404 '@myproject/authentication@1.0.93' is not in this registry.
my .npmrc
includes
@myproject:registry=https://company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/
//company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/:always-auth=true
//company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/:_authToken=${CODEARTIFACT_AUTH_TOKEN}
However,I can see the repo on the dsahboard and the query aws codeartifact list-package-versions --package authentication --domain company --domain-owner 112233445566 --repository myrepo --format npm --namespace myproject
returns
{
"versions": [
{
"version": "1.0.93",
"revision": "<somebase64string>",
"status": "Published",
"origin": {
"domainEntryPoint": {
"repositoryName": "myrepo"
},
"originType": "INTERNAL"
}
}
],
"defaultDisplayVersion": "1.0.93",
"format": "npm",
"package": "authentication",
"namespace": "myproject"
}
Could it be the %2f
being used in the request rather then a '/'?
I should mention that I am using WSL (Ubuntu) on Windows10. I do not think this is the issue however, since this setup work with a private verdaccio server (https://verdaccio.org/).