Skip to content

Commit f6defd5

Browse files
committed
Worked on another solution rather than pnpm
1 parent b56165a commit f6defd5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/api/tsserver/tsservers.mts

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { spawn } from 'child_process';
22
import { TsServer } from './tsserver.mjs';
3+
import Path from 'node:path';
34

45
/**
56
* This object is responsible for managing multiple tsserver instances.
@@ -44,7 +45,15 @@ export class TsServers {
4445
// created, the dependencies are not installed and thus this will
4546
// shut down immediately. Make sure that we handle this case after
4647
// package.json has finished installing its deps.
47-
const child = spawn('pnpm', ['dlx' ,'tsserver'], {
48+
49+
const tsserverPath = Path.resolve(
50+
options.cwd,
51+
'node_modules',
52+
'bin',
53+
process.platform === 'win32' ? 'tsserver.cmd' : 'tsserver'
54+
)
55+
56+
const child = spawn(tsserverPath, [], {
4857
cwd: options.cwd,
4958
shell: true
5059
});

0 commit comments

Comments
 (0)