@rubytech/create-maxy-lite 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +19 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -136,18 +136,26 @@ const installDeps = async () => {
136
136
  // built artifact directly to recover the actual dlopen error, and carry THAT into
137
137
  // err= — the true reason (ABI/NODE_MODULE_VERSION/symbol/ELF), not the swallowed miss.
138
138
  if (runIn(ptyLoadCommand()).code !== 0) {
139
- const direct = runIn(ptyDirectLoadCommand())
140
- // proot emits `can't sanitize binding /proc/self/fd/*` lines to stderr on every
141
- // non-interactive login; they are noise that buries (and truncates) the real
142
- // dlopen error. Strip them so err= carries only the actual cause.
143
- const cause =
144
- direct.stderr
139
+ // Build err= from the THREE facts that pin a native-load failure, each plainly
140
+ // labelled not the raw multi-line Node stack (which buries the real line and
141
+ // truncates). `lines()` drops proot's per-login `can't sanitize binding` noise.
142
+ const lines = (s) =>
143
+ String(s || '')
145
144
  .split('\n')
146
- .filter((l) => !/proot warning: can't sanitize binding/.test(l))
147
- .join(' ')
148
- .replace(/\s+/g, ' ')
149
- .trim() || `no stderr; ${PTY_NODE}`
150
- throw new Error(`node-pty native module did not load after build: ${cause}`)
145
+ .map((l) => l.trim())
146
+ .filter((l) => l && !/proot warning: can't sanitize binding/.test(l))
147
+ const join = (s) => lines(s).join(' ').replace(/\s+/g, ' ').trim()
148
+
149
+ // 1. The real error line only (e.g. `Error: libc.so: cannot open shared object
150
+ // file`), not the dlopen stack frames.
151
+ const direct = runIn(ptyDirectLoadCommand())
152
+ const errLine = lines(direct.stderr).find((l) => /Error:/.test(l)) || join(direct.stderr) || `no stderr; ${PTY_NODE}`
153
+ // 2. ldd: which shared objects pty.node needs and which resolve to "not found".
154
+ const ldd = join(runIn(`ldd ${PTY_NODE} 2>&1`).stdout)
155
+ // 3. Any leaked Termux linker env that could have steered the build's libc.
156
+ const env = join(runIn(`env | grep -iE 'LD_PRELOAD|LD_LIBRARY_PATH|LIBRARY_PATH' || echo '(no LD_* env)'`).stdout)
157
+
158
+ throw new Error(`node-pty did not load | error: ${errLine} | ldd: ${ldd} | env: ${env}`)
151
159
  }
152
160
  }
153
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy-lite",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Install maxy-lite on an Android phone: orchestrates proot-distro Ubuntu, glibc Node, claude, the web-chat relay, the vault and its bind-mount — run via npx in bare Termux.",
5
5
  "type": "module",
6
6
  "engines": {