Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrupted dependencies on windows? #3038

Open
soryy708 opened this issue Aug 21, 2024 · 0 comments
Open

corrupted dependencies on windows? #3038

soryy708 opened this issue Aug 21, 2024 · 0 comments

Comments

@soryy708
Copy link
Contributor

When I:

  1. Clone this repository on a Windows machine
  2. npm i (successfully)
  3. npm i again (as-is or trying to install a new dependency)

It fails with:

PS C:\Users\USER\Documents\Software Engineering\Personal\eslint-plugin-import> npm i
npm ERR! Invalid Version:

npm ERR! A complete log of this run can be found in: C:\Users\USER\AppData\Local\npm-cache\_logs\2024-08-21T19_33_20_132Z-debug-0.log

The log file it mentions contains:

0 verbose cli E:\Program Files\NodeJS\node.exe E:\Program Files\NodeJS\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:E:\Program Files\NodeJS\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\USER\Documents\Software Engineering\Personal\eslint-plugin-import\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\USER\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\USER\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 12ms
17 timing npm:load:configload Completed in 12ms
18 timing config:load:flatten Completed in 2ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm i
22 verbose argv "i"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:C:\Users\USER\AppData\Local\npm-cache\_logs\2024-08-21T19_33_20_132Z-
26 verbose logfile C:\Users\USER\AppData\Local\npm-cache\_logs\2024-08-21T19_33_20_132Z-debug-0.log
27 timing npm:load:logFile Completed in 8ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 50ms
31 timing arborist:ctor Completed in 1ms
32 silly logfile start cleaning logs, removing 2 files
33 timing arborist:ctor Completed in 0ms
34 silly logfile done cleaning log files
35 verbose shrinkwrap failed to load node_modules/.package-lock.json missing from lockfile: resolvers/webpack/node_modules/resolve
36 verbose shrinkwrap failed to load node_modules/.package-lock.json missing from lockfile: resolvers/webpack/node_modules/resolve
37 timing idealTree:init Completed in 2093ms
38 timing idealTree:userRequests Completed in 0ms
39 silly idealTree buildDeps
40 timing idealTree:#root Completed in 1ms
41 timing idealTree:resolvers/node Completed in 0ms
42 silly fetch manifest webpack@https://gist.github.com/ljharb/9cdb687f3806f8e6cb8a365d0b7840eb
43 silly placeDep ROOT [email protected] REPLACE for: [email protected] want: https://gist.github.com/ljharb/9cdb687f3806f8e6cb8a365d0b7840eb
44 timing idealTree Completed in 3749ms
45 timing command:i Completed in 3760ms
46 verbose stack TypeError: Invalid Version: 
46 verbose stack     at new SemVer (E:\Program Files\NodeJS\node_modules\npm\node_modules\semver\classes\semver.js:38:13)
46 verbose stack     at compare (E:\Program Files\NodeJS\node_modules\npm\node_modules\semver\functions\compare.js:3:32)
46 verbose stack     at Object.gte (E:\Program Files\NodeJS\node_modules\npm\node_modules\semver\functions\gte.js:2:30)
46 verbose stack     at Node.canDedupe (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\node.js:1079:32)
46 verbose stack     at PlaceDep.pruneDedupable (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:426:14)
46 verbose stack     at new PlaceDep (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:278:14)
46 verbose stack     at #buildDepStep (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:933:18)
46 verbose stack     at async Arborist.buildIdealTree (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:196:7)
46 verbose stack     at async Promise.all (index 1)
46 verbose stack     at async Arborist.reify (E:\Program Files\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:159:5)
47 verbose cwd C:\Users\USER\Documents\Software Engineering\Personal\eslint-plugin-import
48 verbose Windows_NT 10.0.22631
49 verbose node v20.11.1
50 verbose npm  v10.2.4
51 error Invalid Version: 
52 verbose exit 1
53 timing npm Completed in 4180ms
54 verbose unfinished npm timer reify 1724268800553
55 verbose unfinished npm timer reify:loadTrees 1724268800559
56 verbose unfinished npm timer idealTree:buildDeps 1724268802654
57 verbose unfinished npm timer idealTree:resolvers/webpack 1724268802657
58 verbose code 1
59 error A complete log of this run can be found in: C:\Users\USER\AppData\Local\npm-cache\_logs\2024-08-21T19_33_20_132Z-debug-0.log

Looks like we're getting an exception from semver for some reason.

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

No branches or pull requests

1 participant