Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Angular Language Service does not activate in multi-root workspaces (npm workspaces monorepo)

Abierto
#70,678 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
angular, typescript, vscode

Línea de trabajo

Comienza reproduciendo el problema con el npm workspaces monorepo y la configuración .code-workspace proporcionados, compáralo con abrir p11ui.angular directamente y comprueba la salida de Angular Language Service. Rastrea la activación para las carpetas del espacio de trabajo que contienen angular.json; la tarea está terminada cuando la extensión se inicia en el multi-root workspace y se restauran hover, autocomplete, template diagnostics y el restart command.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area: vscode-extension gemini-triaged
Which @angular/* package(s) are the source of the bug?

language-service

Is this a regression?

No

Description

Description

The Angular Language Service extension (Angular.ng-template) does not activate
when the workspace root opened in VS Code is a multi-root workspace
(.code-workspace file) that spans multiple sibling folders, one of which
contains the Angular project (angular.json).

Environment

  • Angular: 22.1.3
  • @angular/language-service: 22.1.6
  • Extension version: Angular.ng-template 22.1.1
  • VS Code: [deine VS Code Version hier einfügen]
  • OS: Windows

Project structure

npm workspaces monorepo:

p11ui-workspace/ (root, contains package.json with "workspaces": [...])
p11ui.core/ (plain TypeScript/Lit package, no Angular)
p11ui.angular.adapter/ (Angular directives package, built with ng-packagr)
p11ui.angular/ (Angular CLI application, contains angular.json)

Steps to reproduce

  1. Open ONLY the p11ui.angular folder directly in VS Code (File > Open Folder).
    Result: Angular Language Service activates correctly. Output panel shows
    "Angular language server process ID: ..." and correctly lists detected
    package.json roots. Hover, autocomplete and template diagnostics all work
    as expected, including for custom directives with @Input() bindings.

  2. Instead, create a .code-workspace file at the monorepo root:
    {
    "folders": [
    { "path": "p11ui.core" },
    { "path": "p11ui.angular.adapter" },
    { "path": "p11ui.angular" }
    ]
    }
    Open this workspace file in VS Code (File > Open Workspace from File...).

Result: Angular Language Service does not activate. The Output panel entry
for "Angular Language Service" is empty (no "process ID" log line at all).
The command "Angular: Restart Angular Language server" is present in the
Command Palette but throws:
"command 'angular.restartNgServer' not found"
Hovering over ngModel, structural directives, or any custom Angular
directive/component produces no tooltip. No autocomplete is offered for
custom @Input() properties. No NG80xx diagnostics are shown either (the
language service appears fully inactive, not just producing false negatives).

  1. Reloading the window (Developer: Reload Window) does not fix it.
  2. Opening a .ts file inside p11ui.angular as the first action after opening
    the workspace does not fix it either.

Expected behavior

Angular Language Service should activate for the folder(s) within a
multi-root workspace that contain a valid angular.json, the same way it
activates when that folder is opened directly as a single root.

Additional context

We also tested Visual Studio 2026 (not VS Code) with the official
TypeScriptTeam.AngularLanguageService extension for the same project,
which is currently non-functional with Angular 21+ per existing reports
(reported separately to microsoft/vs-ng-language-service). VS Code with
a single-root folder is currently our only working setup, which is why
multi-root support matters to us — we cannot fall back to Visual Studio,
and a single-root VS Code window forces us to split our monorepo across
multiple editor windows.

Regards
pc

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw
No exception is thrown and no error is logged in the "Angular Language Service" 
output channel (it remains completely empty).

The only error observed is when manually trying to restart the server via the 
Command Palette:

Command 'Angular: Restart Angular Language server' resulted in an error
command 'angular.restartNgServer' not found
Please provide the environment you discovered this bug in (run ng version)

Anything else?

This issue is most likely to surface specifically during library development,
not during normal consumption of a published library.

When developing an Angular-consumable library (e.g. a component library built
as a separate TypeScript package), it's common to use npm/yarn workspaces to
work on the library source and a consuming Angular application side by side
in the same repository, with the Angular app opened as one of several sibling
folders via a multi-root workspace.

Once such a library is published and used normally — i.e. installed as a
regular npm dependency inside a single Angular CLI workspace (single folder,
single angular.json) — the Angular Language Service works correctly, as
confirmed by our own testing (see "Steps to reproduce", step 1). The bug
therefore mainly affects library authors during development, not end users
of published libraries.

Lenguaje dominante
TypeScript
Estrellas
101k
Forks
28.1k
Merge medio
2 d 6 h
PR fusionados (30 d)
307

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de angular/angular

Todos los issues de angular/angular

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.