After making changes to my Phoenix project, VSCode often gives me warnings:
Phoenix.LiveView.TagEngine.component/3 defined in application :phoenix_live_view is used by the current application but the current application does not depend on :phoenix_live_view.
Invalid type specification for functioncoming from the
- And other warnings that I don't remember now.
Here are some the things that help me to clear those warnings on VSCode:
- Delete the
- Reinstall dependencies:
- With an
.exfile open, go to the Command Palette (Cmd + Shift + P) and run these commands:
Elixir: Trigger mix clean --deps in language serverand
Elixir: Restart language server, then restart VSCode.
If Elixir (not VSCode) starts complaining about routes not found, then you can delete the
_build directory and compile your project again (