r/switch2hacks • • 5d ago

Question CivSwitchLDN: NPM install fails while installing Python dependencies(?). Logs included.

I'm trying to figure out how to get CivSwitchLDN going.

I open Terminal while in the civswitchldn-main folder and run npm install. It did a whole lot of installing, before giving the following error:

setup] Installing Python dependencies
bash/setup.sh: line 17: /home/xxxx/Downloads/Compressed/CivSwitchLDN-main/ldn/.venv/bin/pip: No such file or directory
npm ERR! code 127
npm ERR! path /home/xxxx/Downloads/Compressed/CivSwitchLDN-main
npm ERR! command failed
npm ERR! command sh -c bash bash/setup.sh

The log file it produced bellow.

0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@9.2.0
2 info using node@v18.19.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/share/nodejs/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/xxxx/Downloads/Compressed/CivSwitchLDN-main/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/xxxx/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 5ms
17 timing npm:load:configload Completed in 5ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 0ms
20 verbose title npm install
21 verbose argv "install"
22 timing npm:load:setTitle Completed in 0ms
23 timing config:load:flatten Completed in 2ms
24 timing npm:load:display Completed in 2ms
25 verbose logfile logs-max:10 dir:/home/xxxx/.npm/_logs/2026-11-27T23_29_54_671Z-
26 verbose logfile /home/xxxx/.npm/_logs/2026-11-27T23_29_54_671Z-debug-0.log
27 timing npm:load:logFile Completed in 4ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 12ms
31 silly logfile done cleaning log files
32 timing config:load:flatten Completed in 0ms
33 timing arborist:ctor Completed in 0ms
34 timing idealTree:init Completed in 14ms
35 timing idealTree:userRequests Completed in 0ms
36 silly idealTree buildDeps
37 timing idealTree:#root Completed in 0ms
38 timing idealTree:buildDeps Completed in 0ms
39 timing idealTree:fixDepFlags Completed in 0ms
40 timing idealTree Completed in 15ms
41 timing arborist:ctor Completed in 0ms
42 timing reify:loadTrees Completed in 22ms
43 timing reify:diffTrees Completed in 1ms
44 silly reify moves {}
45 timing reify:retireShallow Completed in 0ms
46 timing reify:createSparse Completed in 0ms
47 timing reify:loadBundles Completed in 0ms
48 silly audit bulk request {
48 silly audit   '@jridgewell/gen-mapping': [ '0.3.13' ],
48 silly audit   '@jridgewell/resolve-uri': [ '3.1.2' ],
48 silly audit   '@jridgewell/source-map': [ '0.3.11' ],
48 silly audit   '@jridgewell/sourcemap-codec': [ '1.6.0' ],
48 silly audit   '@jridgewell/trace-mapping': [ '0.3.31' ],
48 silly audit   acorn: [ '8.19.0' ],
48 silly audit   'buffer-from': [ '1.1.2' ],
48 silly audit   commander: [ '2.20.3' ],
48 silly audit   'source-map': [ '0.6.1' ],
48 silly audit   'source-map-support': [ '0.5.21' ],
48 silly audit   terser: [ '5.51.2' ]
48 silly audit }
49 timing reify:unpack Completed in 2ms
50 timing reify:unretire Completed in 0ms
51 timing build:queue Completed in 0ms
52 timing build:deps Completed in 0ms
53 timing build Completed in 0ms
54 timing reify:build Completed in 0ms
55 timing reify:trash Completed in 0ms
56 timing reify:save Completed in 5ms
57 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 302ms
58 timing auditReport:getReport Completed in 304ms
59 silly audit report {}
60 timing auditReport:init Completed in 0ms
61 timing reify:audit Completed in 305ms
62 timing reify Completed in 329ms
63 timing command:install Completed in 338ms
64 verbose stack Error: command failed
64 verbose stack     at ChildProcess.<anonymous> (/usr/share/nodejs/@npmcli/promise-spawn/lib/index.js:53:27)
64 verbose stack     at ChildProcess.emit (node:events:517:28)
64 verbose stack     at maybeClose (node:internal/child_process:1098:16)
64 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:303:5)
65 verbose pkgid civswitchldn@1.0.0
66 verbose cwd /home/xxxx/Downloads/Compressed/CivSwitchLDN-main
67 verbose Linux 7.0.0-44-generic
68 verbose node v18.19.1
69 verbose npm  v9.2.0
70 error code 127
71 error path /home/xxxx/Downloads/Compressed/CivSwitchLDN-main
72 error command failed
73 error command sh -c bash bash/setup.sh
74 verbose exit 127
75 timing npm Completed in 358ms
76 verbose code 127
77 error A complete log of this run can be found in:
77 error     /home/xxxx/.npm/_logs/2026-11-27T23_29_54_671Z-debug-0.log

Just from reading the initial error I've got a hunch that I'm missing some file?

I tried running npm start, despite the error. Not surprisingly it didn't work.

sudo npm start

> civswitchldn@1.0.0 start
> node run.js

Preparing the payload...
core 61038 -> terser 26143 -> deflate 6612 -> stage-hex 23154
offline decode: EXACT
LDN installer assets ready: template 1546308 bytes, apply 50760 bytes
minify 30217 → b25 13808 | decoder 4060
21 lines (5 decoder + 15 payload + 1 finale), longest 999
Payload ready (21 chat messages, UDP installer receiver).
[net] Run setup first: npm install
Error: bash exited with code 1
0 Upvotes

2 comments sorted by

1

u/Exabytez 5d ago edited 5d ago

Reporting an issue on GutHub is probably better and also helps others who go to this repo and have the same issue.

My guess is you ignored the requirements and don't have python with venv installed. And that the folder inside Downloads is called "Compressed" is also giving me a weird feeling but I never heard of sonething like that so maybe that's just a stupid folder name choice

If you don't know how to fulfil the requirements ask AI or better yet stop bothering with stuff you don't understand as all of this is in its infancy

0

u/EpicBumGamers 4d ago edited 4d ago

That was quite the unhelpful comment.

I don't know what the issue was. I decided to go back and just extract the files from the zip file to a new folder. Entered the folder as Root, and started from the top. And it worked flawlessly.

I'm sure glad I didn't have to succumb to the AI overlords.

As for the "weird" feeling "Compressed" folder. That's simply my download manager sorting files. Being a .zip file initially, it goes to said folder.