Skip to content

Crash on startup #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
caiusCitiriga opened this issue Nov 30, 2020 · 7 comments
Closed

Crash on startup #1001

caiusCitiriga opened this issue Nov 30, 2020 · 7 comments
Labels

Comments

@caiusCitiriga
Copy link

Describe the bug

Angular language service crashes on startup opening an Angular 10 project.

Expected behavior

I've noticed this when my html template wasn't showing errors even when it should.

I can see that it doesn't find somethig, but I don't quite get what or how to solve it...
I've seen this issue before on this repo, but all the responses were pointing to some PRs that should have fixed this already...

If it can helps, the language service works on another Angular 8.1 application...

Logs

Please attach two logs:

  1. Console output (Go to toolbar --> View --> Output, and copy the contents)
[Info  - 5:54:59 PM] Angular language server process ID: 14446
[Info  - 5:54:59 PM] Using typescript/lib/tsserverlibrary v4.0.5 from /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js
[Info  - 5:54:59 PM] Using @angular/language-service v11.0.1 from /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/node_modules/@angular/language-service/bundles/language-service.js
[Info  - 5:54:59 PM] Log file: /Users/caiuscitiriga/Library/Application Support/Code/logs/20201130T091207/exthost1/Angular.ng-template/nglangsvc.log
[Error - 5:55:08 PM] TypeError: Cannot read property 'attachToProject' of undefined
    at /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148616:32
    at Object.enumerateInsertsAndDeletes (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:2316:13)
    at ConfiguredProject.Project.updateGraphWorker (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148610:20)
    at ConfiguredProject.Project.updateGraph (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148460:42)
    at ConfiguredProject.updateGraph (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:149394:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151098:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151996:44)
    at ProjectService.openClientFileWithNormalizedPath (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:152140:31)
    at ProjectService.openClientFile (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151913:29)
    at Session.onDidOpenTextDocument (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/index.js:1042:49)
[Error - 5:55:08 PM] Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'attachToProject' of undefined
  1. Log file (Path is printed to the console output at startup)
Info 0    [17:54:59.892] Format host information updated
Info 1    [17:54:59.893] reload projects.
Info 2    [17:54:59.893] Before ensureProjectForOpenFiles:
Info 3    [17:54:59.893] After ensureProjectForOpenFiles:
Info 4    [17:54:59.893] Host file extension mappings updated
Info 5    [17:54:59.894] Angular language server process ID: 14446
Info 6    [17:54:59.894] Using typescript/lib/tsserverlibrary v4.0.5 from /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js
Info 7    [17:54:59.894] Using @angular/language-service v11.0.1 from /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/node_modules/@angular/language-service/bundles/language-service.js
Info 8    [17:54:59.894] Log file: /Users/caiuscitiriga/Library/Application Support/Code/logs/20201130T091207/exthost1/Angular.ng-template/nglangsvc.log
Info 9    [17:54:59.901] Search path: /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app
Info 10   [17:54:59.902] For info: /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.component.html :: Config file name: /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/tsconfig.json
Info 11   [17:54:59.902] Opened configuration file /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/tsconfig.json
Info 12   [17:54:59.906] Loading new project: Creating possible configured project for /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.component.html to open
Info 13   [17:55:0.0] Config: /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/tsconfig.json : {
 "rootNames": [
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/e2e/src/app.e2e-spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/e2e/src/app.po.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/main.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/polyfills.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/test.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/base/base.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/base/base.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/base/grid.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/const/app-routes.const.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/guards/auth.guard.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/models/auth-token.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/models/base-response.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/models/storage-keys.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/access.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/categories.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/config-panel.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/files.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/navigation.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/section-title.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/storage.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/stores.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/token-interceptor.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/core/services/users.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/access/access-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/access/access.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/access/access.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/access/access.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/dashboard/dashboard-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/dashboard/dashboard.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/dashboard/dashboard.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/dashboard/dashboard.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/not-found/not-found-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/not-found/not-found.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/not-found/not-found.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/not-found/not-found.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/stores-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/stores.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/stores.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/stores.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/admin-store-edit.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/admin-store-edit.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/general-data/general-data.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/general-data/general-data.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-contacts/store-contacts.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-contacts/store-contacts.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-managers/store-managers.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-managers/store-managers.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/store-services.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/store-services.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/delivery-service/delivery-service.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/delivery-service/delivery-service.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/menu-service/menu-service.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/menu-service/menu-service.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/takeaway-service/takeaway-service.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-services/components/takeaway-service/takeaway-service.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-timetables/store-timetables.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/components/store-timetables/store-timetables.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/admin-store-edit/resolvers/admin-store-edit-resolver.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/my-stores/my-stores.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/my-stores/my-stores.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/stores-management/stores-management.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/stores-management/stores-management.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/stores/components/stores-management/resolvers/stores-management-resolver.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/users-routing.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/users.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/users.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/users.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/enums/user-permissions.enum.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/enums/user-types.enum.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/models/user.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/pipes/user-status-color.pipe.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/pipes/user-type-icon.pipe.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/modules/users/resolvers/users-resolver.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/enums/payment-modes.enum.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/enums/services-types.enum.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/enums/weekdays.enum.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/geojson-point.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/geojson-polygon.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/localized-value.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/category.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/contacts.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/manager.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/picture.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/store.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/timetable.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/base-store-service.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/delivery-store-service.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/menu-store-service.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/takeaway-store-service.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/products/deliverable-product.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/models/stores/services/products/product.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/alert/alert.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/alert/alert.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/alert/alert.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/categories-manager-dialog/categories-manager-dialog.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/categories-manager-dialog/categories-manager-dialog.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/categories-manager-dialog/categories-manager-dialog.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/location-picker-dialog/location-picker-dialog.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/location-picker-dialog/location-picker-dialog.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/location-picker-dialog/location-picker-dialog.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/map/map.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/map/map.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/map/map.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/map/models/map-marker.model.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/pictures-manager/pictures-manager.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/pictures-manager/pictures-manager.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/pictures-manager/pictures-manager.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/pipes/pipes.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/pipes/pipes/extract-cat-localized-name.pipe.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/prompt/prompt.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/prompt/prompt.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/prompt/prompt.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/users-lists-config-panel/users-lists-config-panel.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/users-lists-config-panel/users-lists-config-panel.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/users-lists-config-panel/users-lists-config-panel.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/users-lists-config-panel/pipes/has-permission.pipe.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/users-lists-config-panel/pipes/has-permission.pipe.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/validations/validations.component.spec.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/validations/validations.component.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/modules/validations/validations.module.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/resolvers/main-categories-resolver.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/shared/resolvers/sub-categories-resolver.service.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/environments/environment.prod.ts",
  "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/environments/environment.ts"
 ],
 "options": {
  "baseUrl": "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console",
  "outDir": "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/dist/out-tsc",
  "sourceMap": true,
  "declaration": false,
  "downlevelIteration": true,
  "experimentalDecorators": true,
  "moduleResolution": 2,
  "importHelpers": true,
  "target": 2,
  "module": 6,
  "lib": [
   "lib.es2018.d.ts",
   "lib.dom.d.ts"
  ],
  "configFilePath": "/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/tsconfig.json"
 }
}
Info 14   [17:55:0.2] Loading global plugin @angular/language-service
Info 15   [17:55:0.2] Enabling plugin @angular/language-service from candidate paths: /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/node_modules/@angular/language-service/bundles/language-service.js,/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js/../../..
Info 16   [17:55:0.2] Loading @angular/language-service from /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/node_modules/@angular/language-service/bundles/language-service.js (resolved to /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/node_modules/@angular/language-service/bundles/language-service.js/node_modules)
Info 17   [17:55:0.49] Plugin validation succeded
Info 18   [17:55:0.135] Starting updateGraphWorker: Project: /Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/tsconfig.json
Err 19    [17:55:8.832] TypeError: Cannot read property 'attachToProject' of undefined
    at /Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148616:32
    at Object.enumerateInsertsAndDeletes (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:2316:13)
    at ConfiguredProject.Project.updateGraphWorker (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148610:20)
    at ConfiguredProject.Project.updateGraph (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:148460:42)
    at ConfiguredProject.updateGraph (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:149394:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151098:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151996:44)
    at ProjectService.openClientFileWithNormalizedPath (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:152140:31)
    at ProjectService.openClientFile (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/node_modules/typescript/lib/tsserverlibrary.js:151913:29)
    at Session.onDidOpenTextDocument (/Users/caiuscitiriga/.vscode/extensions/angular.ng-template-0.1100.1/server/index.js:1042:49)
@kyliau
Copy link
Contributor

kyliau commented Nov 30, 2020

I suspect one of the external templates in your project does not exist on disk (could be a typo in templateUrl)
That said, this should not crash the server. I've submitted a PR to the TypeScript repo linked above.

@caiusCitiriga
Copy link
Author

caiusCitiriga commented Dec 1, 2020

Thank you for the support @kyliau 😊 In the meantime could you suggest any temporary fix?

By the way, the same project opened on my macbook pro works fine... 🤔 The issue occurs with this project opened on my iMac, running HighSierra, while the macbook runs Mojave...

@ayazhafiz
Copy link
Contributor

ayazhafiz commented Dec 1, 2020

@caiusCitriga what is the path of the project on your iMac?

@kyliau I think the problem is a little more subtle and related to #892. For example, resolving a template path in the project path @caiusCitiriga gave will yield an incorrect path (f.x. resolve('/Users/caiuscitiriga/Code/topevo/#iorestoacasa/console/src/app/app.component.ts', './template.html') === "/Users/caiuscitiriga/Code/topevo/template.html", see https://runkit.com/ayazhafiz/chessisagame).

I guess as a temporary fix, you could rename your project path(s) not contain #, which avoids this bug.

@caiusCitiriga
Copy link
Author

@ayazhafiz hmmmm actually you've pointed out an important thing... now that you're speaking about the # in the path, yesterday when I've cloned the project on an ubuntu machine (and thus recreating the folders structure) it wouldn't let me do mkdir #iorestoacasa... so I guess that this should be a warning sign...

And indeed you were right! Removing the # from the path fixed the issue ❤️

I'm pretty surprised though that Mac allows you to create a folder with a name that Ubuntu doesn't... 🤷‍♂️

@caiusCitiriga
Copy link
Author

Anyhow, to me wasn't a big issue changing the folder name, but I guess that it's not everyone's case. Still, I'm glad to have been helpful in finding out this issue 😊

@caiusCitiriga caiusCitiriga reopened this Dec 2, 2020
kyliau added a commit to kyliau/angular that referenced this issue Dec 2, 2020
…exist

There is a bug in tsserver that causes it to crash when it tries to create
script info for an external template that does not exist.

I've submitted an upstream PR
microsoft/TypeScript#41737 to fix this, but before
the commit lands in the stable release, we'll have to workaround the issue
in language service.

Close angular/vscode-ng-language-service#1001
@ayazhafiz
Copy link
Contributor

I'm pretty surprised though that Mac allows you to create a folder with a name that Ubuntu doesn't... 🤷‍♂️

just an aside: ubuntu should let you, but maybe your shell doesn't. If you quote the filename or escape the # it should work, like touch "#foo" or touch \#foo

ayazhafiz added a commit to ayazhafiz/angular that referenced this issue Dec 3, 2020
In the past, the legacy (VE-based) language service would use a
`UrlResolver` instance to resolve file paths, primarily for compiler
resources like external templates. The problem with this is that the
UrlResolver is designed to resolve URLs in general, and so for a path
like `/a/b/#c`, `#c` is treated as hash/fragment rather than as part
of the path, which can lead to unexpected path resolution (f.x.,
`resolve('a/b/#c/d.ts', './d.html')` would produce `'a/b/d.html'` rather
than the expected `'a/b/#c/d.html'`).

This commit resolves the issue by using Node's `path` module to resolve
file paths directly, which aligns more with how resources are resolved
in the Ivy compiler.

The testing story here is not great, and the API for validating a file
path could be a little bit prettier/robust. However, since the VE-based
language service is going into more of a "maintenance mode" now that
there is a clear path for the Ivy-based LS moving forward, I think it is
okay not to spend too much time here.

Closes angular/vscode-ng-language-service#892
Closes angular/vscode-ng-language-service#1001
mhevery pushed a commit to angular/angular that referenced this issue Dec 3, 2020
…exist (#39898)

There is a bug in tsserver that causes it to crash when it tries to create
script info for an external template that does not exist.

I've submitted an upstream PR
microsoft/TypeScript#41737 to fix this, but before
the commit lands in the stable release, we'll have to workaround the issue
in language service.

Close angular/vscode-ng-language-service#1001

PR Close #39898
mhevery pushed a commit to angular/angular that referenced this issue Dec 3, 2020
In the past, the legacy (VE-based) language service would use a
`UrlResolver` instance to resolve file paths, primarily for compiler
resources like external templates. The problem with this is that the
UrlResolver is designed to resolve URLs in general, and so for a path
like `/a/b/#c`, `#c` is treated as hash/fragment rather than as part
of the path, which can lead to unexpected path resolution (f.x.,
`resolve('a/b/#c/d.ts', './d.html')` would produce `'a/b/d.html'` rather
than the expected `'a/b/#c/d.html'`).

This commit resolves the issue by using Node's `path` module to resolve
file paths directly, which aligns more with how resources are resolved
in the Ivy compiler.

The testing story here is not great, and the API for validating a file
path could be a little bit prettier/robust. However, since the VE-based
language service is going into more of a "maintenance mode" now that
there is a clear path for the Ivy-based LS moving forward, I think it is
okay not to spend too much time here.

Closes angular/vscode-ng-language-service#892
Closes angular/vscode-ng-language-service#1001

PR Close #39917
mhevery pushed a commit to angular/angular that referenced this issue Dec 3, 2020
In the past, the legacy (VE-based) language service would use a
`UrlResolver` instance to resolve file paths, primarily for compiler
resources like external templates. The problem with this is that the
UrlResolver is designed to resolve URLs in general, and so for a path
like `/a/b/#c`, `#c` is treated as hash/fragment rather than as part
of the path, which can lead to unexpected path resolution (f.x.,
`resolve('a/b/#c/d.ts', './d.html')` would produce `'a/b/d.html'` rather
than the expected `'a/b/#c/d.html'`).

This commit resolves the issue by using Node's `path` module to resolve
file paths directly, which aligns more with how resources are resolved
in the Ivy compiler.

The testing story here is not great, and the API for validating a file
path could be a little bit prettier/robust. However, since the VE-based
language service is going into more of a "maintenance mode" now that
there is a clear path for the Ivy-based LS moving forward, I think it is
okay not to spend too much time here.

Closes angular/vscode-ng-language-service#892
Closes angular/vscode-ng-language-service#1001

PR Close #39917
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy