WebStorm gives "Cannot resolve directory 'some_path'" error.
if assets path is used instead of relative path. By assets path I mean path starting with /assets/.
There is no problem when relative path is used:
Both codes works well in a browser, but for the first one WebStorm gives errors. How to solve this issue or tell WebStorm to ignore it if the path starts with /assets/?


/assets/is located in your project? relative to the project root and website root? Please show it a screenshot of the project View panel that would show this info. The issue quite likely be because the IDE expects that/assets/is located in the project root folder (since it starts with/(which means absolute path). If it's not (e.g. in a subfolder) then the parent folder must be marked as a Resource Root.