Search code examples
angularvisual-studio-codelanguage-server-protocol

Angular v15.2.0 language server crashing in VSCode


While opening an Angular project in VSCode. I am getting this error. How do I fix it?

[Info  - 19:50:59] Angular language server process ID: 99118
[Info  - 19:50:59] Using typescript/lib/tsserverlibrary v4.9.5 from /Users/myuser/learning/ng-project/node_modules/typescript/lib/tsserverlibrary.js
[Info  - 19:50:59] Using @angular/language-service v15.2.0 from /Users/myuser/.vscode/extensions/angular.ng-template-15.2.0/node_modules/@angular/language-service/index.js
[Info  - 19:50:59] Logging is turned off. To enable, run command 'Open Angular server log'.
[Error - 19:51:00] No config file for /Users/myuser/learning/ng-project/src/app/app.component.html
[Error - 19:51:00] No config file for /Users/myuser/learning/ng-project/src/app/app.component.html
[Error - 19:51:00] No config file for /Users/myuser/learning/ng-project/src/app/app.component.html
[Error - 19:51:01] No config file for /Users/myuser/learning/ng-project/src/app/app.component.html
[Error - 19:51:01] Failed to run ngcc for /Users/myuser/learning/ng-project/tsconfig.json, language service may not operate correctly:
    ngcc for /Users/myuser/learning/ng-project/tsconfig.json returned exit code 1, stderr: Error: EACCES: permission denied, open '/Users/myuser/learning/ng-project/node_modules/.ngcc_lock_file'

Solution

  • It is a permission issue. I ran this command to fix this error.

    sudo chown -R $USER /Users/myuser/learning/ng-project/node_modules