Webstorm doesn't see API

一个人想着一个人 提交于 2019-12-11 07:44:59

问题


I am using JetBrain's WebStorm to do my JavaScript coding. Honestly, I have tried other programs and truly think this may be the best coding environment for JavaScript.

Unfortunately, for some reason it does not see the OpenLayers 3 class structure whatsoever. Usually, the IntelliSense in WebStorm doesn't have any trouble, but everything in this case is labelled error red because it cannot find the structure. This structure is located at: http://ol3js.org/en/master/build/ol.js.

I have copied the file locally and created the appropriate reference locally in the project. WebStorm had no problems with OpenLayers 2 API located at: https://github.com/openlayers/openlayers, but for some reason now it cannot see OpenLayers 3 object. It has nothing to do with it not being able to locate the namespace, because it finds the ol class and has no reference issues finding the file in the source directory.

I have also added the ol.js API library as an external JS library to the project in WebStorm, which does not solve the problem.

来源:https://stackoverflow.com/questions/18888412/webstorm-doesnt-see-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!