npm install fails to install the correct version, then continues to fail installing the selected version which doesn't even exit

We’re failing to get our heads around this.

Basically, we get this when we want to upgrade our package:

npm install [redacted]-client@^0.9.0-beta.802

0.9.0-beta.802 is the package version that is the newest version.

We receive this error:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for [redacted-dependency]@0.0.12-beta.30
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! notarget
npm ERR! notarget It was specified as a dependency of '[redacted]-client'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     [redacted]/.npm/_logs/2019-08-19T09_28_29_298Z-debug.log

In [redacted]-client’s package.json, we state that we want version

  "dependencies": {
...
    "[redacted-dependency]": "0.0.14-beta.172"
  },

[redacted]-client’s package-lock.json is consistent:

    "[redacted-dependency]": {
      "version": "0.0.14-beta.172",
      "resolved": "https://npm.[redacted]/[redacted-dependency]/-/[redacted-dependency]-0.0.14-beta.172.tgz",
      "integrity": "sha1-uCeBdiQxjqPpqKAmZe2fJhUBnZ0="
    }

The logfile contains:

0 info it worked if it ends with ok
1 verbose cli [ '[redacted]/.nvm/versions/node/v8.15.0/bin/node',
1 verbose cli   '[redacted]/.nvm/versions/node/v8.15.0/bin/npm',
1 verbose cli   'install',
1 verbose cli   '[redacted]-client@^0.9.0-beta.802' ]
2 info using npm@6.4.1
3 info using node@v8.15.0
4 verbose npm-session a9a4f7a3994d63ff
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://npm.[redacted]/[redacted]-client 3614ms
8 silly pacote range manifest for [redacted]-client@^0.9.0-beta.802 fetched in 3637ms
9 timing stage:loadCurrentTree Completed in 7814ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 32ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1358ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule [redacted]-client@0.9.0 checking installable status
17 silly tarball trying https://npm.[redacted]/[redacted]-client/-/[redacted]-client-0.9.0.tgz by hash: sha512-FtoAcpIMvMaIIkyPbS5sbd0k/uOm+AMxZPUKf6Jgy2qFsJzshaSGYwsQT2P0pfWtgnEZEjNoLEzcBR3Zi/Uz6w==
18 silly extract https://npm.[redacted]/[redacted]-client/-/[redacted]-client-0.9.0.tgz extracted to /var/folders/wb/xrdckxln64b23wt65g_vz_nm0000gn/T/npm-76710-71258033/unpack-16885aea (59ms)
19 silly addBundled read tarball
20 silly cleanup remove extracted module
21 silly removeObsoleteDep removing [redacted]-client@0.9.0-beta.802 from the tree as its been replaced by a newer version or is no longer required
[...lots of other silly removeObsoleteDep]
71 silly removeObsoleteDep removing [redacted-dependency]@0.0.14-beta.172 from the tree as its been replaced by a newer version or is no longer required
72 http fetch GET 200 https://npm.[redacted]/pusher-js 1064ms
73 silly pacote range manifest for pusher-js@^4.1.0 fetched in 1068ms
74 silly resolveWithNewModule pusher-js@4.4.0 checking installable status
75 http fetch GET 200 https://npm.[redacted]/superagent 1164ms
76 silly pacote range manifest for superagent@^3.6.0 fetched in 1177ms
77 silly resolveWithNewModule superagent@3.8.3 checking installable status
78 http fetch GET 200 https://npm.[redacted]/[redacted-dependency] 1748ms
79 silly registry:manifest no matching version for [redacted-dependency]@0.0.12-beta.30 in the cache. Forcing revalidation
80 http fetch GET 200 https://npm.[redacted]/[redacted-dependency] 956ms
81 silly fetchPackageMetaData error for [redacted-dependency]@0.0.12-beta.30 No matching version found for [redacted-dependency]@0.0.12-beta.30
82 timing stage:rollbackFailedOptional Completed in 1ms
83 timing stage:runTopLevelLifecycles Completed in 12036ms
[...more stuff]

For what it’s worth: version 0.0.12-beta.30 never existed, the first version was 0.0.12, the next was 0.0.12-beta-31 (as verified by manually downloading the package, unpacking it and looking into the files).

We’re getting this weird error also when manually editing package.json to update the package, and leaving it up to npm install to update package-lock.json (which works for other packages).

Removing the ^ from the install command does work, so we already have a workable workaround.


Update: Seems like we got this fixed!

The ‘latest’ (not beta) pointed to a dependency that didn’t exist. So we created a new latest version with npm version patch and then publishing the package with npm publish (so without the --beta flag).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.