🐛 fix(cli): robust npx entry point, Node 20 requirement, setup hardening (#8)

- Use fs.realpathSync for entry point detection to fix npx symlink failures
- Add --help and --version CLI flags with explicit process.exit(0)
- Add TTY detection in setup wizard to prevent non-interactive hangs
- Wrap JSON.parse in mergeJsonConfig with try/catch for malformed configs
- Update engines.node to >=20.0.0 to match better-sqlite3 requirements
- Update Dockerfiles from node:18-slim to node:20-slim
- Remove error-swallowing || true from postinstall script
- Replace deprecated windows-build-tools with VS Build Tools link
This commit is contained in:
Sanjib Devnath
2026-03-13 18:21:19 +05:30
committed by GitHub
parent 6a69ac6761
commit 97d816df4a
7 changed files with 65 additions and 20 deletions
+2 -4
View File
@@ -58,7 +58,7 @@ Click the workspace badge to switch between isolated canvases — each workspace
| Requirement | Why | Check |
|---|---|---|
| **Node.js >= 18** (LTS 20 or 22 recommended) | Runtime | `node --version` |
| **Node.js >= 20** (LTS 20 or 22 recommended) | Runtime | `node --version` |
| **C++ build tools** | `better-sqlite3` compiles native bindings | See below |
| **npm** (bundled with Node.js) | Package manager | `npm --version` |
@@ -75,9 +75,7 @@ sudo apt install build-essential python3
```
**Windows:**
```bash
npm install --global windows-build-tools
```
Install "Desktop development with C++" from [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
> `better-sqlite3` ships prebuilt binaries for most Node LTS versions. The build tools are only needed when a prebuilt binary isn't available for your platform/Node combination.