-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels