IntelliJ IDEA Can't Resolve Directory



I have a web site project folder that looks something like this:


My index.cfm file includes the content from the /includes/public.cfm file. The public.cfm file has references to various .css and .js files in it like this:

<base href="http://localhost/mysite/">
<script type="text/javascript" src="js/jquery.js"></script>

The problem is that IDEA can't find the file /js/jquery.js and shows a "cannot resolve directory" inspection error even though the file does exist in the project structure.

How can I tell IDEA to always look at my project root for resolving directory locations? It would be great if it could first look relative to the current folder and then look relative to the project root.

Note: when the web site gets deployed to production, it will reside at but it should also be able to reside in a sub folder for development purposes.



We have related request on YouTrack:

Feel free to vote for it and leave comments.



Thank you Yaroslav.  I see that feature request was created way back in 2010. Hopefully it is something that can be implemented in the near future.


Please sign in to leave a comment.