Hi,
The Angular language server does not start in Zed on Windows.
Zed displays the following error:
Language server angular:
from extension "Angular" version 0.0.6:
Expected Angular language server path
'node_modules/@angular/language-server/index.js'
was not found in the project.
Please ensure '@angular/language-server' is installed
in your project's node_modules.
However, @angular/language-server is installed locally in the project, and the expected file exists.
From the project root:
Test-Path .\node_modules\@angular\language-server\index.js
Output:
Node can also resolve both the Angular language server and TypeScript successfully:
node -p "require.resolve('@angular/language-server')"
Output:
C:\***\node_modules\.pnpm\@angular+language-server@22.0.8\node_modules\@angular\language-server\index.js
node -p "require.resolve('typescript/lib/tsserverlibrary')"
Output:
C:\***\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsserverlibrary.js
Environment
- OS: Windows
- Zed: latest version
- Angular extension:
0.0.6
- Angular project
@angular/language-server: 22.0.8
- TypeScript:
5.9.3
- Package manager: pnpm
Suspected cause
Looking at the extension source, the Angular language server path is checked as a relative path:
const SERVER_PATH: &str =
"node_modules/@angular/language-server/index.js";
let server_exists = self.file_exists_at_path(SERVER_PATH);
The path does not appear to be joined with the active worktree root:
The extension also later uses:
to construct the language server path and TypeScript SDK path.
If env::current_dir() points to the extension runtime directory rather than the opened project directory, the extension will search for node_modules in the wrong location.
Expected behavior
The extension should resolve the Angular language server relative to the active worktree, for example:
PathBuf::from(worktree.root_path())
.join("node_modules")
.join("@angular")
.join("language-server")
.join("index.js")
The TypeScript SDK path and probe locations should also be resolved relative to worktree.root_path().
Alternatively, the extension could use Node module resolution from the worktree root, which would work correctly with pnpm's virtual store layout.
Actual behavior
The extension reports that @angular/language-server is missing, even though:
- The expected path exists.
- Node resolves
@angular/language-server successfully.
- Node resolves
typescript/lib/tsserverlibrary successfully.
This suggests that the issue is in the extension's path resolution rather than a missing dependency.
Could the extension use worktree.root_path() instead of a relative path or env::current_dir() when resolving the Angular language server and TypeScript?
Hi,
The Angular language server does not start in Zed on Windows.
Zed displays the following error:
However,
@angular/language-serveris installed locally in the project, and the expected file exists.From the project root:
Output:
Node can also resolve both the Angular language server and TypeScript successfully:
Output:
Output:
Environment
0.0.6@angular/language-server:22.0.85.9.3Suspected cause
Looking at the extension source, the Angular language server path is checked as a relative path:
The path does not appear to be joined with the active worktree root:
The extension also later uses:
to construct the language server path and TypeScript SDK path.
If
env::current_dir()points to the extension runtime directory rather than the opened project directory, the extension will search fornode_modulesin the wrong location.Expected behavior
The extension should resolve the Angular language server relative to the active worktree, for example:
The TypeScript SDK path and probe locations should also be resolved relative to
worktree.root_path().Alternatively, the extension could use Node module resolution from the worktree root, which would work correctly with pnpm's virtual store layout.
Actual behavior
The extension reports that
@angular/language-serveris missing, even though:@angular/language-serversuccessfully.typescript/lib/tsserverlibrarysuccessfully.This suggests that the issue is in the extension's path resolution rather than a missing dependency.
Could the extension use
worktree.root_path()instead of a relative path orenv::current_dir()when resolving the Angular language server and TypeScript?