Closed iamcco closed 2 years ago
@iamcco I was not able to reproduce this following the steps in the original issue
I double and triple checked that I was using node v12 as well.
I noticed in the logs that the language service plugin fails to activate
Info 19 [16:42:11.110] Enabling plugin @angular/language-service from candidate paths: /Users/aioiyuuko/.config/coc/extensions/node_modules/coc-angular/node_modules/@angular/language-service/index.js,/Users/aioiyuuko/workspaces/anduin/node_modules/typescript/lib/tsserverlibrary.js/../../..
Info 20 [16:42:11.110] Loading @angular/language-service from /Users/aioiyuuko/.config/coc/extensions/node_modules/coc-angular/node_modules/@angular/language-service/index.js (resolved to /Users/aioiyuuko/.config/coc/extensions/node_modules/coc-angular/node_modules/@angular/language-service/index.js/node_modules)
Info 21 [16:42:11.237] Plugin activation failed: SyntaxError: Unexpected token '?'
Do you have an example project? What version of VSCode are you using?
Hi @atscott . I posted the original issue to the coc-angular
repo. The issue wasn't reproducible in VSCode. Could it be the case that vscode uses a different node runtime than the one installed in your system? (see https://github.com/iamcco/coc-angular/issues/56#issuecomment-1127373585)
@joeveiga Does an older version of the @angular/language-server package work? It could be helpful to pinpoint exactly what version this stopped working in.
FWIW node 12 isn't even supported anymore: https://nodejs.org/en/about/releases. v12 has been dropped from the engines list in Angular 14. I do realize we're talking about the v13 package here, but I can't imagine we'd do a ton of investigation to ensure it works again for node 12. If installing an older version of the package does the trick, that would likely be the best bet.
@atscott yeah I should probably push for updating the node version on my end 😅. Thanks!
got it
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.
🐞 bug report
Is this a regression?
Work well with nodejs v14 and v16, and the
view-engine
also works well with nodejs v12Description
Does not work with nodejs v12
Bug Type
What does this bug affect
Logs
nglangsvc.log
Language server output channel:
🌍 Your Environment
Angular Version:
@angular/server Version:
Nodejs Version:
Extension options:
Anything else relevant?
Relative issue https://github.com/iamcco/coc-angular/issues/56