WebStorm There is no locally stored library

后端 未结 2 1274
半阙折子戏
半阙折子戏 2021-02-12 17:22

I\'have been working on a project which totally works on jsfiddle.net . However, when i try to run this project in webStorm, i get two errors.

first :

2条回答
  •  梦毁少年i
    2021-02-12 18:10

    1. Seems that you get the error when running your .js file directly, via 'Run file_name.js' in it's right-click menu, right? When doing this you are running it using Node.js. But 'document' can't be used in server-side scripts executed by Node.js. It is only defined in client-side javascript, i.e. when running in the browser via a tag in the rendered HTML, not the Javascript API engine running on the server. BTW, your .js file is not even included in your HTML page, as far as I can see from HTML code snippet...

    2. This is not actually an error... WebStorm can't use remote resources available through CDN links for completion. Once it 'sees' such links, it searches for the corresponding library in ~.WebStorm9\system\extLibs\, and, if matching library is not found, prompts you to download it by showing this warning. You can either suppress this warning or agree to download the library: hit Alt+Enter and then either hit the right arrow and choose 'Suppress for tag' or hit Enter to download.

提交回复
热议问题