clawdhub@0.3.0 on npm missing dependency 'undici' (ERR_MODULE_NOT_FOUND) #20

Open
opened 2026-02-15 17:15:08 -05:00 by yindo · 3 comments
Owner

Originally created by @Mikemototo on GitHub (Jan 27, 2026).

Repro (Linux, Node v22.20.0, npm 10.9.3):\n\n1) npm i -g clawdhub@0.3.0\n2) clawdhub search "calendar"\n\nResult:\n\nError [ERR_MODULE_NOT_FOUND]: Cannot find package 'undici' imported from .../node_modules/clawdhub/dist/http.js\n\nNotes:\n- dist/http.js imports { Agent, setGlobalDispatcher } from 'undici'.\n- {
'@clack/prompts': '^0.11.0',
arktype: '^2.1.29',
commander: '^14.0.2',
fflate: '^0.8.2',
ignore: '^7.0.5',
json5: '^2.2.3',
mime: '^4.1.0',
ora: '^9.0.0',
'p-retry': '^7.1.1',
semver: '^7.7.3'
} does not list undici, so a clean global install crashes at runtime.\n\nWorkaround:\n- npm i -g undici\n\nFix:\n- Add to packages/clawdhub/package.json dependencies and publish a patch release (0.3.1) so users don't need to manually install a transitive global dep.\n\nHappy to provide logs if needed.

Originally created by @Mikemototo on GitHub (Jan 27, 2026). Repro (Linux, Node v22.20.0, npm 10.9.3):\n\n1) npm i -g clawdhub@0.3.0\n2) clawdhub search "calendar"\n\nResult:\n\nError [ERR_MODULE_NOT_FOUND]: Cannot find package 'undici' imported from .../node_modules/clawdhub/dist/http.js\n\nNotes:\n- dist/http.js imports { Agent, setGlobalDispatcher } from 'undici'.\n- { '@clack/prompts': '^0.11.0', arktype: '^2.1.29', commander: '^14.0.2', fflate: '^0.8.2', ignore: '^7.0.5', json5: '^2.2.3', mime: '^4.1.0', ora: '^9.0.0', 'p-retry': '^7.1.1', semver: '^7.7.3' } does not list undici, so a clean global install crashes at runtime.\n\nWorkaround:\n- npm i -g undici\n\nFix:\n- Add to packages/clawdhub/package.json dependencies and publish a patch release (0.3.1) so users don't need to manually install a transitive global dep.\n\nHappy to provide logs if needed.
Author
Owner

@Mikemototo commented on GitHub (Jan 27, 2026):

Correction (my shell ate backticks in the original issue body):\n\n- {
'@clack/prompts': '^0.11.0',
arktype: '^2.1.29',
commander: '^14.0.2',
fflate: '^0.8.2',
ignore: '^7.0.5',
json5: '^2.2.3',
mime: '^4.1.0',
ora: '^9.0.0',
'p-retry': '^7.1.1',
semver: '^7.7.3'
} does not include \n- Yet imports from , causing ERR_MODULE_NOT_FOUND after a fresh install\n\nSuggested fix: add to the published package dependencies and cut a patch release (e.g. 0.3.1).\n\nWorkaround for users in the meantime:
changed 1 package in 171ms

@Mikemototo commented on GitHub (Jan 27, 2026): Correction (my shell ate backticks in the original issue body):\n\n- { '@clack/prompts': '^0.11.0', arktype: '^2.1.29', commander: '^14.0.2', fflate: '^0.8.2', ignore: '^7.0.5', json5: '^2.2.3', mime: '^4.1.0', ora: '^9.0.0', 'p-retry': '^7.1.1', semver: '^7.7.3' } does *not* include \n- Yet imports from , causing ERR_MODULE_NOT_FOUND after a fresh install\n\nSuggested fix: add to the published package dependencies and cut a patch release (e.g. 0.3.1).\n\nWorkaround for users in the meantime: changed 1 package in 171ms
Author
Owner

@Mikemototo commented on GitHub (Jan 27, 2026):

Clean repro/notes (no markdown backticks):

  • npm view clawdhub@0.3.0 dependencies -> does NOT include undici
  • but the published dist/http.js imports undici (Agent, setGlobalDispatcher)
  • so a fresh npm i -g clawdhub@0.3.0 can crash with ERR_MODULE_NOT_FOUND for undici

Suggested fix: include undici in the published package dependencies and publish a patch release (0.3.1).

Temporary workaround: npm i -g undici

@Mikemototo commented on GitHub (Jan 27, 2026): Clean repro/notes (no markdown backticks): - npm view clawdhub@0.3.0 dependencies -> does NOT include undici - but the published dist/http.js imports undici (Agent, setGlobalDispatcher) - so a fresh npm i -g clawdhub@0.3.0 can crash with ERR_MODULE_NOT_FOUND for undici Suggested fix: include undici in the published package dependencies and publish a patch release (0.3.1). Temporary workaround: npm i -g undici
Author
Owner

@tarcisiopgs commented on GitHub (Jan 27, 2026):

Also affected by this issue on Node.js v22.22.0.

Workaround: Manually install undici in the npx cache directory:

cd ~/.npm/_npx/$(ls ~/.npm/_npx | head -1) && npm install undici

This allows clawdhub commands to work until the dependency is properly added to package.json.

@tarcisiopgs commented on GitHub (Jan 27, 2026): Also affected by this issue on Node.js v22.22.0. **Workaround:** Manually install `undici` in the npx cache directory: ```bash cd ~/.npm/_npx/$(ls ~/.npm/_npx | head -1) && npm install undici ``` This allows `clawdhub` commands to work until the dependency is properly added to `package.json`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#20