Angular: "Unresolved pipe" error in template
Problem
Angular template references, such as pipes, are not resolved by the IDE and appear as errors. Import suggestions are missing from the quick-fixes list.
Cause [Optional]
The issue is caused by the node_modules directory being marked as excluded in the project structure. This prevents WebStorm from indexing Angular packages, causing references in templates to be unresolved and suppressing import quick-fixes.
Resolution
Ensure node_modules is not excluded in the project:
- In Settings | Languages & Frameworks | JavaScript | Libraries, verify that a library for your project’s
node_modulesexists and is enabled. - In the Project tool window,
node_modulesshould be marked as a “library root,” not as an excluded folder. - If the above settings are incorrect or cannot be changed, close the IDE, remove both
.idea(you can previously copy it to another location as a backup) andnode_modulesdirectories from the project root, then reopen the project and reinstall dependencies.
Please sign in to leave a comment.