I'm using AWS CodeArtifact as a npm registry and it fails to install esbuild. More specifically, the install of esbuild itself succeeds, but the execution of install.js defined in 'postinstall' fails. In install.js, node's child_process executes another npm install, but at this time, '_authToken' defined in the .npmrc placed in the project does not take effect. (status 401 is returned.) On the other hand, the registry specification in the .npmrc is still enabled in child_process, so it seems that the .npmrc is not completely ignored.
My .npmrc is defined as follows:
registry=https://my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my-cli-repo/
//my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/:_authToken=eyJ2ZX...
//my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/:always-auth=true
I think this is not a problem specific to AWS CodeArtifact, but a common problem with private registries that require 'authToken'.
Has anyone else experienced a similar case?
Also, is there any solution to this problem?
Thanks in advance.
I'm using AWS CodeArtifact as a npm registry and it fails to install esbuild. More specifically, the install of esbuild itself succeeds, but the execution of
install.jsdefined in 'postinstall' fails. Ininstall.js, node'schild_processexecutes anothernpm install, but at this time, '_authToken' defined in the.npmrcplaced in the project does not take effect. (status 401 is returned.) On the other hand, the registry specification in the.npmrcis still enabled inchild_process, so it seems that the.npmrcis not completely ignored.My
.npmrcis defined as follows:I think this is not a problem specific to AWS CodeArtifact, but a common problem with private registries that require 'authToken'.
Has anyone else experienced a similar case?
Also, is there any solution to this problem?
Thanks in advance.