Cannot resolve Directory/File

Hi,

I've just picked up a web project from a previous owner and have decided to use WebStorm as my IDE for this project.  But I've run into a problem where literally every script or other reference in my index page is highlighted in yellow and gives the message "Cannot resolve directory" or if the mouse is hovered above the filename, "Cannot resolve file".

I've seen several posts on this topic but no suggestions have worked for me.  This may be related to the differences between our source tree and the live production tree, but I don't know how to reconcile them.

In our case, we have a source tree like this: \Sources\UI\Common\<various js files>

we have a production tree like this: \Root\Common\<various js files>

Our script references look for \Root\Common\<js filename> since that is where the production distribution on the web server will find it.  But since there is no \Root component in our source tree, the reference cannot be resolved.

Setting the resource root to any location in the source tree does not seem to resolve the issue.

Is there a way to resolve this?

Thanks,

Jim

 

 

 

 

 

1 comment
Comment actions Permalink

Normally absolute URL (starting with slash) are resolved relative to project root folder (or to resource root folder if the certain directory is marked as Resource root). Relative URLs (without slash) are resolved relative to current file. If the path in URL doesn't exist (as in your case), marking folders as Resource roots won't help. I can only suggest disabling File reference problems inspection in Settings | Editor | Inspections | HTML

0

Please sign in to leave a comment.