fix: replace ts-node with tsx for worker scripts
TypeScript 7's CommonJS export no longer populates ts.sys, which ts-node's config loader depends on, breaking `npm run worker` with a TypeError. tsx (esbuild-based) doesn't rely on that API and natively resolves tsconfig.json path aliases, so tsconfig-paths is also no longer needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,12 +22,8 @@ if (existsSync(PID_FILE)) {
|
||||
}
|
||||
|
||||
const child = spawn(
|
||||
'node',
|
||||
[
|
||||
'-r', 'ts-node/register',
|
||||
'-r', 'tsconfig-paths/register',
|
||||
path.join(__dirname, 'index.ts'),
|
||||
],
|
||||
process.execPath,
|
||||
[require.resolve('tsx/cli'), path.join(__dirname, 'index.ts')],
|
||||
{ detached: true, stdio: 'ignore' }
|
||||
)
|
||||
child.unref()
|
||||
|
||||
Reference in New Issue
Block a user