Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

NPM Install ETARGET - No Matching Version #12

Open
cseitz opened this issue Dec 7, 2022 · 5 comments
Open

NPM Install ETARGET - No Matching Version #12

cseitz opened this issue Dec 7, 2022 · 5 comments

Comments

@cseitz
Copy link
Contributor

cseitz commented Dec 7, 2022

@toBeOfUse :

  • Documenting the error I currently get when running npm install with this branch (reorg) checked out:
PS C:\Users\Mitch\Documents\repositories\khe-2023> npm install
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @kenthackenough/tsconfig@^1.0.36.
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!     C:\Users\Mitch\AppData\Local\npm-cache\_logs\2022-12-07T04_01_34_875Z-debug-0.log

The referenced error log looks like this:

2022-12-07T04_01_34_875Z-debug-0.log
0 verbose cli [
0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli   'C:\\Users\\Mitch\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'install'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 17ms
6 timing config:load:builtin Completed in 17ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\Mitch\Documents\repositories\khe-2023\.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\Mitch\.npmrc Completed in 1ms
12 timing config:load:user Completed in 2ms
13 timing config:load:file:C:\Users\Mitch\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 31ms
19 timing npm:load:configload Completed in 31ms
20 timing npm:load:setTitle Completed in 1ms
21 timing config:load:flatten Completed in 5ms
22 timing npm:load:display Completed in 8ms
23 verbose logfile C:\Users\Mitch\AppData\Local\npm-cache\_logs\2022-12-07T04_01_34_875Z-debug-0.log
24 timing npm:load:logFile Completed in 15ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 56ms
28 timing arborist:ctor Completed in 1ms
29 silly logfile start cleaning logs, removing 4 files
30 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: docker/tools/proxy
31 timing idealTree:init Completed in 1735ms
32 timing idealTree:userRequests Completed in 1ms
33 silly idealTree buildDeps
34 timing idealTree:#root Completed in 1ms
35 timing idealTree:.github/scripts Completed in 1ms
36 silly fetch manifest @kenthackenough/tsconfig@^1.0.36
37 http fetch GET 200 https://registry.npmjs.org/@kenthackenough%2ftsconfig 912ms (cache revalidated)
38 silly placeDep docker/tools/proxy @kenthackenough/tsconfig@ OK for: @kenthackenough/[email protected] want: ^1.0.36
39 timing idealTree:docker/tools/proxy Completed in 928ms
40 silly placeDep library/react @kenthackenough/tsconfig@ OK for: @kenthackenough/[email protected] want: ^1.0.36
41 timing idealTree:library/react Completed in 2ms
42 timing idealTree:library/tsconfig Completed in 0ms
43 silly placeDep projects/server @kenthackenough/tsconfig@ OK for: @kenthackenough/[email protected] want: ^1.0.36
44 timing idealTree:projects/server Completed in 3ms
45 silly fetch manifest @kenthackenough/ui@^1.0.36
46 http fetch GET 404 https://registry.npmjs.org/@kenthackenough%2fui 362ms (cache skip)
47 http fetch GET 404 https://registry.npmjs.org/@kenthackenough%2fui 404ms (cache skip)
48 silly placeDep projects/staff @kenthackenough/tsconfig@ OK for: @kenthackenough/[email protected] want: ^1.0.36
49 silly placeDep projects/staff @kenthackenough/ui@ OK for: @kenthackenough/[email protected] want: ^1.0.36
50 timing idealTree:projects/staff Completed in 777ms
51 timing idealTree:projects/ui Completed in 1ms
52 timing idealTree:repos/templates Completed in 0ms
53 timing idealTree:repos/templates/web Completed in 0ms
54 timing idealTree:docker/tools/proxy/node_modules/@kenthackenough/tsconfig Completed in 0ms
55 timing idealTree:library/react/node_modules/@kenthackenough/tsconfig Completed in 0ms
56 timing idealTree:projects/server/node_modules/@kenthackenough/tsconfig Completed in 0ms
57 timing idealTree:projects/staff/node_modules/@kenthackenough/tsconfig Completed in 0ms
58 timing idealTree:projects/staff/node_modules/@kenthackenough/ui Completed in 0ms
59 timing idealTree:buildDeps Completed in 1720ms
60 timing idealTree:fixDepFlags Completed in 12ms
61 timing idealTree Completed in 3471ms
62 timing command:install Completed in 3494ms
63 verbose type range
64 verbose stack @kenthackenough/tsconfig: No matching version found for @kenthackenough/tsconfig@^1.0.36.
64 verbose stack     at module.exports (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\npm-pick-manifest\index.js:209:23)
64 verbose stack     at C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\registry.js:118:26
64 verbose stack     at async [nodeFromEdge] (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1066:19)
64 verbose stack     at async [buildDepStep] (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:935:11)
64 verbose stack     at async Arborist.buildIdealTree (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
64 verbose stack     at async Promise.all (index 1)
64 verbose stack     at async Arborist.reify (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:149:5)
64 verbose stack     at async Install.exec (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:157:5)
64 verbose stack     at async module.exports (C:\Users\Mitch\AppData\Roaming\npm\node_modules\npm\lib\cli.js:66:5)
65 verbose cwd C:\Users\Mitch\Documents\repositories\khe-2023
66 verbose Windows_NT 10.0.19043
67 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mitch\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
68 verbose node v18.12.1
69 verbose npm  v8.3.1
70 error code ETARGET
71 error notarget No matching version found for @kenthackenough/tsconfig@^1.0.36.
72 error notarget In most cases you or one of your dependencies are requesting
72 error notarget a package version that doesn't exist.
73 verbose exit 1
74 timing npm Completed in 4118ms
75 verbose unfinished npm timer reify 1670385695474
76 verbose unfinished npm timer reify:loadTrees 1670385695493
77 verbose code 1
78 error A complete log of this run can be found in:
78 error     C:\Users\Mitch\AppData\Local\npm-cache\_logs\2022-12-07T04_01_34_875Z-debug-0.log

The issue can be worked around by just find and replacing 1.0.36 with 1.0.34 in the package.json files, and should obviously fix itself when this branch is merged into main and the new packages are published to npm, but it is really weird that it does not find the local latest versions itself.

Originally posted by @toBeOfUse in #11 (comment)

@cseitz
Copy link
Contributor Author

cseitz commented Dec 7, 2022

Can you run node -v and npm -v? I just did a clean clone and install on both windows and WSL2 and did not have this issue.

@toBeOfUse
Copy link
Contributor

npm -v
8.3.1
node -v
v18.12.1

^ this surprises me a bit - i knew i had recently installed the latest lts version of node, but it apparently didn't come with the latest version of npm - that npm version is one from a year ago that i probably got when i first installed node on this laptop. i'm going to upgrade npm and try npm install again

@toBeOfUse
Copy link
Contributor

Upgrading npm did not fix the issue. However, pulling in the 3 recently added commits to the reorg branch did. npm install seems to run fine now.

@toBeOfUse
Copy link
Contributor

The problem was definitely fixed by these changes to the main package-lock.json in the second to last commit in the reorg branch; npm install works when that commit is checked out but not when the one before it is. In this commit, all the version numbers for @kenthackenough packages are moved forward from 1.0.34 (or in some cases 1.0.0) to 1.0.36. The source of these changes is somewhat obscure to me; I'm guessing you didn't edit package-lock manually? Of course, when you change the version of a package in package.json, and then run npm install, that change is then propagated to the package-lock file, but I was unable to run npm install at that point, that was the whole problem.

@toBeOfUse
Copy link
Contributor

(For practical purposes this issue is fixed and could be closed now, but I'm still curious about the mechanics behind it)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants