You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# .gitkeep file auto-generated at 2026-06-11T13:26:22.528Z for PR creation at branch issue-1903-1bd05d5aade7 for issue https://github.com/link-assistant/hive-mind/issues/1903
2
-
# Updated: 2026-06-12T21:23:19.753Z
1
+
# .gitkeep file auto-generated at 2026-06-11T13:26:22.528Z for PR creation at branch issue-1903-1bd05d5aade7 for issue https://github.com/link-assistant/hive-mind/issues/1903
| Downstream preflight in Hive Mind | Hive Mind | Detect non-writable npm global root before `use-m`, set `npm_config_prefix=~/.npm-global`, prepend `~/.npm-global/bin`. | Fixes users immediately; can be tested locally with injected fs/npm mocks. | Duplicates policy that belongs in use-m. | Implemented as temporary workaround. |
81
-
| Writable cache/prefix in use-m | use-m | Before `npm install -g`, test `npm root -g`; if unwritable, use a use-m-owned user prefix/cache for alias installs. | Fixes all downstream packages and keeps resolver logic in one place. | Requires upstream release and migration decision. | Recommended upstream solution. |
82
-
| Clear upstream error only | use-m | Detect unwritable global root and throw an actionable error before raw npm EACCES. | Smallest upstream change. | Users still need manual remediation; downstream CLIs still fail. | Acceptable fallback, not preferred. |
83
-
| Replace use-m global npm installs with project-local dynamic imports | use-m or Hive Mind | Avoid `npm install -g`; install/cache packages under an app/user cache and import from there. | Avoids global npm prefix entirely. | Larger resolver redesign; more cache invalidation and security review. | Long-term alternative. |
84
-
| Vendor all dynamic dependencies | Hive Mind | Replace `use-m` bootstraps with package dependencies/imports. | Removes this class of startup failure for Hive Mind. | Large architectural change; loses current cross-runtime dynamic-loading pattern. | Out of scope for this bug. |
| Downstream preflight in Hive Mind | Hive Mind | Detect non-writable npm global root before `use-m`, set `npm_config_prefix=~/.npm-global`, prepend `~/.npm-global/bin`. | Fixes users immediately; can be tested locally with injected fs/npm mocks. | Duplicates policy that belongs in use-m. | Implemented temporarily, removed by PR #1911. |
83
+
| Writable cache/prefix in use-m | use-m | Before `npm install -g`, test `npm root -g`; if unwritable, use a use-m-owned user prefix/cache for alias installs. | Fixes all downstream packages and keeps resolver logic in one place. | Requires upstream release and migration decision. | Recommended upstream solution. |
84
+
| Clear upstream error only | use-m | Detect unwritable global root and throw an actionable error before raw npm EACCES. | Smallest upstream change. | Users still need manual remediation; downstream CLIs still fail. | Acceptable fallback, not preferred. |
85
+
| Replace use-m global npm installs with project-local dynamic imports | use-m or Hive Mind | Avoid `npm install -g`; install/cache packages under an app/user cache and import from there. | Avoids global npm prefix entirely. | Larger resolver redesign; more cache invalidation and security review. | Long-term alternative. |
86
+
| Vendor all dynamic dependencies | Hive Mind | Replace `use-m` bootstraps with package dependencies/imports. | Removes this class of startup failure for Hive Mind. | Large architectural change; loses current cross-runtime dynamic-loading pattern. | Out of scope for this bug. |
85
87
86
-
## Implemented coverage
88
+
## Temporary downstream coverage
87
89
88
-
The workaround is now centralized:
90
+
PR #1898 centralized the workaround while upstream support was pending:
89
91
90
92
-`src/npm-global-prefix.lib.mjs` detects writable/non-writable global npm roots
91
93
and redirects only when needed.
@@ -103,6 +105,18 @@ The source-level regression test prevents reintroducing direct
103
105
`eval(await fetch('https://unpkg.com/use-m/use.js'))` bootstraps outside the
104
106
shared helper.
105
107
108
+
## Cleanup coverage
109
+
110
+
PR #1911 removed Hive Mind's local npm-prefix preflight after verifying
111
+
`use-m@8.13.8` includes equivalent upstream handling:
112
+
113
+
-`src/npm-global-prefix.lib.mjs` was deleted.
114
+
-`src/use-m-bootstrap.lib.mjs` now only loads the shared upstream `use-m`
115
+
bootstrap.
116
+
-`tests/test-npm-global-prefix.mjs` was replaced with
117
+
`tests/test-use-m-bootstrap-no-npm-prefix-workaround.mjs`, which guards
118
+
against reintroducing project-local npm prefix policy.
119
+
106
120
## Existing components and libraries considered
107
121
108
122
- npm global prefix configuration: relevant and used. It is the documented
0 commit comments