diff --git a/CLAUDE.md b/CLAUDE.md index 48925f7..08939d3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -149,10 +149,12 @@ The `.docx` and `.pptx` formats are no longer emitted. Printed handouts (lecture notes, Cornell handout, quiz) render to PDF via `pdflatex`; the slide deck is Slidev Markdown. Exams are built by lectern, not here. -## Required npm/pip Dependencies (user installs once) +## Required npm/pip Dependencies (installed once, at the vault PARENT when in-vault) + +⚠️ **NEVER run `npm install` inside an Obsidian vault.** When this skill is checked out inside a vault, an in-vault `node_modules/` crash-loops Obsidian sync (inotify watch exhaustion). Install **one level above the vault** at `documents/obsidian/node_modules`; Node's upward module resolution finds them automatically, so you normally install nothing. If a (re)install is truly needed, target the parent: ```bash -npm install +npm install --prefix "$(cd /.. && pwd)" # vault PARENT, never the skill dir ``` `pptxgenjs` and `docx` are no longer dependencies. The slides generator emits Slidev diff --git a/README.md b/README.md index 4d52419..a0db8f0 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,11 @@ Then, once per clone: npm install ``` +> ⚠️ **If this checkout lives inside an Obsidian vault** (e.g. `vault/skills/…`), do **not** +> run `npm install` here — an in-vault `node_modules/` crash-loops Obsidian sync. Install at +> the vault parent instead: `npm install --prefix "$(cd /.. && pwd)"`. Node resolves the +> parent `node_modules` upward automatically, so usually you install nothing. + --- ## Repository layout diff --git a/SKILL.md b/SKILL.md index 6662670..9b5553a 100644 --- a/SKILL.md +++ b/SKILL.md @@ -138,9 +138,10 @@ Workflow: node generate.js --main /classes//_lecture_main.md --out . ``` -**Dependencies** (install once per skill checkout): +**Dependencies** — ⚠️ **NEVER run `npm install` inside the vault.** When this skill is checked out *inside* an Obsidian vault (e.g. `vault/skills/…`), an in-vault `node_modules/` (thousands of files) blows the inotify watch limit and crash-loops Obsidian sync. Install **once at the vault parent** (`documents/obsidian/node_modules`, one level *above* `/`). Node's upward module resolution finds them from the skill dir automatically — so normally you install **nothing**. If you ever must (re)install, target the parent explicitly: ```bash -npm install +# install to the vault PARENT — never the skill dir: +npm install --prefix "$(cd /.. && pwd)" ``` A LaTeX toolchain with `pdflatex` is required for the lecture-notes, Cornell, and