Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

visual studio code - Angular language service in VSCode does not work because it is not an Angular project ('@angular/core/core.d.ts' could not be found)

Somehow the Angular (v11.0.4) language service in VSCode does not work anymore. I get the following error message.:

[Info  - 17:52:04] Angular language server process ID: 147359
[Info  - 17:52:04] Using typescript/lib/tsserverlibrary v4.0.5 from ~/.vscode-oss/extensions/angular.ng-template-0.1100.2/node_modules/typescript/lib/tsserverlibrary.js
[Info  - 17:52:04] Using @angular/language-service v11.0.3 from ~/.vscode-oss/extensions/angular.ng-template-0.1100.2/server/node_modules/@angular/language-service/bundles/language-service.js
[Info  - 17:52:04] Log file: ~/.config/Code - OSS/logs/20210112T090839/exthost2/Angular.ng-template/nglangsvc.log
[Info  - 17:52:06] Disabling language service for ~/Workspace/NG_PROJECT/tsconfig.json because it is not an Angular project ('@angular/core/core.d.ts' could not be found). If you believe you are seeing this message in error, please reinstall the packages in your package.json.
[Error - 17:52:06] Failed to find project for ~/Workspace/NG_PROJECT/projects/apps/app1/src/app/*.html
[Error - 17:52:53] No config file for ~/Workspace/NG_PROJECT/projects/apps/app1/src/app/*.html
[Error - 17:52:54] No config file for ~/Workspace/NG_PROJECT/projects/apps/app1/src/app/*.html

I already tried:

rm -rf node_modules package-lock.json
npm cache clean --force
npm install

but it does not solve the problem.

What can I do to solve that issue?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...