Bug
npx openutter join <url> --anon --bot-name "Bot" fails with ERR_MODULE_NOT_FOUND: Cannot find package 'tsx' when run from a directory that does not have tsx in its node_modules.
Root Cause
In bin/openutter.mjs, the runScript() function spawns Node with --import tsx but does not set cwd: pkgRoot:
function runScript(scriptName, args) {
const scriptPath = join(skillSourceDir, "scripts", scriptName);
// ...
const result = spawnSync(process.execPath, ["--import", "tsx", scriptPath, ...args], {
stdio: "inherit",
// ← missing cwd: pkgRoot
});
}
Node resolves --import tsx relative to the current working directory. Since tsx is a dependency of the openutter package (in its own node_modules), it is only resolvable when cwd is the package root.
Other functions in the same file (runNodeCommand, runPlaywrightCommand) correctly set cwd: pkgRoot. This is an inconsistency.
Reproduction
cd /tmp # or any directory without tsx
npx openutter join https://meet.google.com/abc-defg-hij --anon --bot-name "Bot"
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tsx' imported from /tmp/
Fix
Add cwd: pkgRoot to the spawnSync call in runScript(), consistent with the other spawn helpers:
const result = spawnSync(process.execPath, ["--import", "tsx", scriptPath, ...args], {
stdio: "inherit",
cwd: pkgRoot, // ← fix
});
Environment
- Node.js v25.8.0
- openutter 0.1.7
- macOS (arm64)
Bug
npx openutter join <url> --anon --bot-name "Bot"fails withERR_MODULE_NOT_FOUND: Cannot find package 'tsx'when run from a directory that does not havetsxin itsnode_modules.Root Cause
In
bin/openutter.mjs, therunScript()function spawns Node with--import tsxbut does not setcwd: pkgRoot:Node resolves
--import tsxrelative to the current working directory. Sincetsxis a dependency of the openutter package (in its ownnode_modules), it is only resolvable when cwd is the package root.Other functions in the same file (
runNodeCommand,runPlaywrightCommand) correctly setcwd: pkgRoot. This is an inconsistency.Reproduction
Fix
Add
cwd: pkgRootto thespawnSynccall inrunScript(), consistent with the other spawn helpers:Environment