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_modules exists and is enabled.
  • In the Project tool window, node_modules should 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) and node_modules directories from the project root, then reopen the project and reinstall dependencies.
0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request