We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pnpm
1 parent b56165a commit f6defd5Copy full SHA for f6defd5
packages/api/tsserver/tsservers.mts
@@ -1,5 +1,6 @@
1
import { spawn } from 'child_process';
2
import { TsServer } from './tsserver.mjs';
3
+import Path from 'node:path';
4
5
/**
6
* This object is responsible for managing multiple tsserver instances.
@@ -44,7 +45,15 @@ export class TsServers {
44
45
// created, the dependencies are not installed and thus this will
46
// shut down immediately. Make sure that we handle this case after
47
// package.json has finished installing its deps.
- 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, [], {
57
cwd: options.cwd,
58
shell: true
59
});
0 commit comments