Yarn: Regression: Yarn in official docker image fails to install private modules (404)

Created on 21 Apr 2017  路  2Comments  路  Source: yarnpkg/yarn

Encountering a pretty serious regression that has broken all our CI builds with no clear workaround (other then updating all builds to install and use a local fixed version of yarn 0.22.0, which is far from ideal) .

Looks like the node docker images were all updated today with yarn 0.23.2 which is about when I started seeing this issue on my CI tool.

Yarn will not install any private node modules even with a valid token in ~/.npmrc (gives 404 errors). The new images updated from yarn v0.22.0 to v0.23.2. I'm using the node:boron image. Builds that previously passed now fail with the error.

I'm Using 0.23.2 locally with the same token in ~/.npmrc without issue, so i suspect there is some issue with the docker env and yarn 0.23.2. Installing and running a local version of yarn v0.22.0 inside the container does not show the issue (installing v0.23.2 does).

I cross posted this issue as I'm not sure where the regression lives (https://github.com/nodejs/docker-node/issues/386).

triaged

Most helpful comment

I ran into the same issue, it so happens that if you have .npmrc in your working directory it works.

/app # yarn config list                                                      
yarn config v0.23.2                                                          
info yarn config                                                             
{ ... }                                                        
info npm config                                                              
{ version: '0.23.2',                                                         
  loglevel: 'info' }                                                         
Done in 0.03s.          

/app # cp ~/.npmrc .            

/app # yarn config list                                                      
yarn config v0.23.2                                                          
info yarn config                                                             
{ ... }                                                        
info npm config                                                              
{ '//registry.npmjs.org/:_authToken': <TOKEN>,
  version: '0.23.2',                                                         
  loglevel: 'info' }                                                         
Done in 0.02s.                                                               

All 2 comments

This is happening to me in linux with v0.23.2 without docker

I ran into the same issue, it so happens that if you have .npmrc in your working directory it works.

/app # yarn config list                                                      
yarn config v0.23.2                                                          
info yarn config                                                             
{ ... }                                                        
info npm config                                                              
{ version: '0.23.2',                                                         
  loglevel: 'info' }                                                         
Done in 0.03s.          

/app # cp ~/.npmrc .            

/app # yarn config list                                                      
yarn config v0.23.2                                                          
info yarn config                                                             
{ ... }                                                        
info npm config                                                              
{ '//registry.npmjs.org/:_authToken': <TOKEN>,
  version: '0.23.2',                                                         
  loglevel: 'info' }                                                         
Done in 0.02s.                                                               
Was this page helpful?
0 / 5 - 0 ratings