eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Angular extension pack #17109

Open SDAdham opened 4 years ago

SDAdham commented 4 years ago

Can you please add Angular essential extension pack? https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials It'll make a great difference...

Thanks a lot! Adham

SDAdham commented 4 years ago

I added Angular Language Service but this is what I get in the extension's output:

[Error - 11:22:15 AM] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
  Code: -32603 
[Error - 11:22:15 AM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
  Code: -32603 
[Error - 11:22:15 AM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
  Code: -32603 
[Error - 11:22:15 AM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
  Code: -32603 
[Error - 11:22:15 AM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
  Code: -32603 
/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:139878
                this.resolutionCache.startRecordingFilesWithChangedResolutions();
                                     ^

TypeError: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
    at ConfiguredProject.Project.updateGraph (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:139878:38)
    at ConfiguredProject.updateGraph (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:140804:63)
    at Object.updateProjectIfDirty (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:141226:45)
    at ConfiguredProject.Project.getLanguageService (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:139540:28)
    at ProjectService.getDefaultLanguageService (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/server/index.js:867:25)
    at Session.sendPendingDiagnostics (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/server/index.js:1024:47)
    at Timeout.diagnosticsTimeout.setTimeout [as _onTimeout] (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/server/index.js:1009:19)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
[Info  - 11:22:16 AM] Connection to server got closed. Server will 
l0rd commented 4 years ago

@azatsarynnyy is that failing because of an API is missing Theia side? Have we planned some work on it?

azatsarynnyy commented 4 years ago

It fails not because of some missing APIs but because of Angular Language Service depends on typescript and the extension can not find TS. There was similar issue https://github.com/angular/vscode-ng-language-service/issues/594 Seems TS should be placed in one of the pre-defined location https://github.com/angular/vscode-ng-language-service#versioning

azatsarynnyy commented 4 years ago

Maybe, it depends on whether the extension is running in a separate sidecar or in theia-ide sidecar. @SDAdham if you run it in a dedicated sidecar, could you try running it in theia-ide container?

SDAdham commented 4 years ago

Hello @azatsarynnyy , how can I run it in a dedicated sidecar? Can you please provide an example?

azatsarynnyy commented 4 years ago

@SDAdham just remove spec.containers in your meta.yaml

SDAdham commented 4 years ago

Hello @azatsarynnyy , here is my meta.yaml file, I never had spec.containers defined:

apiVersion: v2
publisher: johnpapa
name: Angular2
version: 9.1.2
type: VS Code extension
displayName: Angular Snippets (Version 9)
title: Angular Snippets (Version 9)
description: Angular version 9 snippets by John Papa
icon: https://github.com/johnpapa/vscode-angular-snippets/blob/master/images/angular-shield.png?raw=true
repository: https://github.com/johnpapa/vscode-angular-snippets
category: Snippet
firstPublicationDate: '2020-03-26'
spec:
  extensions:
    - https://<url>/v3/plugins/johnpapa/Angular2/9.1.2/johnpapa.Angular2-9.1.2.vsix
azatsarynnyy commented 4 years ago

Based on the meta.yaml and this error message

TypeError: Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined
    at ConfiguredProject.Project.updateGraph (/tmp/vscode-unpacked/angular.ng-template.0.901.9.qkbhtgbqoq.Angular.ng-template-0.901.9.vsix/extension/node_modules/typescript/lib/tsserverlibrary.js:139878:38)

I think the issue is related to a proper set-up of the extension and TypeScript package https://github.com/angular/vscode-ng-language-service#versioning

I guess Plugins Team can consider adding Angular Plugin to Che Plugin Registry in the future. cc @ericwill

che-bot commented 3 years ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.