I have installed a new laptop with the software and now VS Code can’t read the pipes any more. My colleague has the same applications with their versions installed and is able to run the Angular project without problems.
This is not a problem with the declarations. As mentioned, it was working perfectly fine on my old laptop and on the laptop of my colleague. If I run the project, all is looking good, all pipes are working as expected.
The strange thing is that not all pipes are recognised, some do, some do not…
- Line
15
: No problem with thetranslate
pipe - Line
16
: No problem with thetranslate
pipe - Line
18
:translate
pipe not recognised - … and more, see the errors (it is not only the
translate
pipe, but is used most in our projects
Things I tried:
- Reinstalling Node versions (so I was on the same version as my colleague)
- Removing the complete project on the disk including their dependencies/packages
Versions that we (my colleague and I) have installed:
Visual Studio Code
Angular CLI
Nodes in nvm
20.11.0
* 16.20.2 (Currently using 64-bit executable)
Windows (only my computer-version)
All help is appreciated 👍🏻
2
Answers
I have found the solution: Apparently it was the VS Code extension
Angular Language Service
(from Angular themselves) which was causing these problems. When the extension is disabled I had no errors and enabling it back again the errors popped up.I installed previous versions (up to
11.2.14
) in the hope that I get rid of the errors, but no luck. When updating to the newest and reloading the extension: it was fixed!No problems have been detected in the workspace.
is a good thing to see. And I can also view more info when hovering on thetranslate
pipe:Hopefully other people can apply this solution for them as well.
Greetings, Krant
The issue might be related to another error. First, try to resolve the other problems (ngModel & bsConfig).
If that doesn’t help, try clearing your Angular cache:
ng cache clean
.angular
folder in your project directorynode_modules
foldernpm install
If none of these steps work, please post more of your code (Module, Component).