How to fix the problem....In Visual Studio, you have to right click on the JS file in the Solution Explorer, right click then go to Properties. A dialog box will be open where you can change the TargetPlatformVersion. Change it to Inherit from Parent, if that doesn't work after applying it, go back to the Properties and select the new version number created automatically.
This should definitely fix the error.