Unresolved function or method on very basic JS class Follow
I'm using PHPStorm 2017.2, and no matter what I do, I can't get it to recognize JS methods. I've stripped it down to the most basic example I can, and still no luck.
In the example below, PHPStorm shows "Unresolved function or method exampleInstanceMethod()" for line 8. What do I need to do to fix this?
/* eslint-disable no-console */
/**
*
* @constructor
*/
var TestThing = function()
{
this.exampleInstanceMethod();
};
TestThing.prototype.exampleInstanceMethod = function()
{
console.log('hello');
};
Please sign in to leave a comment.
First, please try running through the caches invalidation (File | Invalidate Caches / Restart).
If it doesn't help, try creating a new empty project and check the same example there.
Invalidating the caches did not correct the issue.
The example worked in a new empty project.
Should I delete and recreate my existing project?
Please try that. Back up the .idea folder, delete it and recreate the project.