Cannot install a package that is published -- possible cache issue

registry
priority:high
triaged

(Todd Kennedy) #1

What I Wanted to Do

Install a package that has been published

What Happened Instead

Got npm ERR! code ETARGET

Reproduction Steps

[15:08:41] $ npm publish
npm notice 
npm notice 📦  @scriptollc/search-queue@2.0.0
npm notice === Tarball Contents === 
npm notice 1.1kB package.json
npm notice 1.4kB index.js    
npm notice 816B  README.md   
npm notice === Tarball Details === 
npm notice name:          @scriptollc/search-queue                
npm notice version:       2.0.0                                   
npm notice package size:  1.7 kB                                  
npm notice unpacked size: 3.3 kB                                  
npm notice shasum:        ce6c505a9c6c926788fe0e00c991a55489bc7399
npm notice integrity:     sha512-PwMTy46En4e7q[...]ZOxonowTdDa7A==
npm notice total files:   3                                       
npm notice 
npm ERR! publish Failed PUT 401
There was an error while trying authentication due to OTP (One-Time-Password).
The One-Time-Password is generated via applications like Authy or
Google Authenticator, for more information see:
https://docs.npmjs.com/getting-started/using-two-factor-authentication
Enter OTP: [redacted]
+ @scriptollc/search-queue@2.0.0

[15:10:20] $ npm view @scriptollc/search-queue

@scriptollc/search-queue@2.0.0 | UNLICENSED | deps: 4 | versions: 6

dist
.tarball: https://registry.npmjs.org/@scriptollc/search-queue/-/search-queue-2.0.0.tgz
.shasum: ce6c505a9c6c926788fe0e00c991a55489bc7399
.integrity: sha512-PwMTy46En4e7q7Qo8HXmgMAoWPYCLQOOUY7ScXtSOm2xhfmGB+ZVdt+fsmM0ilKf7QU+ID6VQZOxonowTdDa7A==
.unpackedSize: 3.3 kB

[cut extraneous stuff]

dist-tags:
latest: 2.0.0  

published a minute ago by toddself

[15:10:22] $ npm i -S @scriptollc/search-queue@2.0.0
<!-- give specific instructions for how someone else can reproduce this behavior if possible. A gist or git repository that can be `npm install`-ed to reproduce an issue is often super helpful! -->
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @scriptollc/search-queue@2.0.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/todd/.npm/_logs/2018-08-28T22_10_30_018Z-debug.log

This is a private scoped package so this cannot be replicated by a user, however, you can clearly see that npm understands the package has been published, yet revi

Details

none

Platform Info

$ npm --versions
{ npm: '6.3.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.29.0',
  node: '8.11.2',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }

$ node -p process.platform
linux

(Todd Kennedy) #2

I published a new version (2.0.1) that lets me install it, but the fact that 2.0.0 appears to be good everywhere (including on the website), except installing it gives me an ETARGET error is pretty vexing.


(Todd Kennedy) #3

So, I don’t believe this is a registry issue.

This is currently happening with another package. Version 1.5.0 is taggest latest, but version 1.4.1 is being installed (1.4.1 being the previous version).

However, if we install either a specific version (npm install @scriptollc/session@1.5.0 OR if we install with an “alternate” cache npm install @scriptollc/session --cache /tmp/whatever OR we force a cache clear with npm cache clear --force and then do npm install @scriptollc/session) we get the right resolved version.

I have upgraded in the meantime to npm 6.4.1:

[13:06:33] $ npm version
{ '@scriptollc/showrunner': '8.1.2',
  npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.29.0',
  node: '8.11.2',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }