WebStorm says console is an unresolved variable

前端 未结 5 1492
旧时难觅i
旧时难觅i 2020-12-20 10:53

For some reason WebStorm says that the global console variable in javascript is unresolved. How can I resolve this?

I am using Node.js

相关标签:
5条回答
  • 2020-12-20 11:17

    I was only able to resolve this by deleting the Webstorm preferences folder and re-installing Webstorm.

    0 讨论(0)
  • 2020-12-20 11:21

    For version 8 and up the solution is to enable NodeJS Globalslibrary:

    Settings > Javascript > Libraries

    0 讨论(0)
  • 2020-12-20 11:26

    Solution for webstorm for NodeJS as of January 2017

    Preferences -> Languages and Frameworks -> JavaScript -> Libraries -> Download -> TypeScript Community Stubs -> node -> Download and Install

    This will remove the unresolved import console warning

    0 讨论(0)
  • 2020-12-20 11:27

    the solution for WebStorm 6.* is to enable 'HTML' library in Settings/javascript/Libraries (same for WebStorm 7.0.1)

    0 讨论(0)
  • 2020-12-20 11:40

    For me worked to change Javascript Language Version to ECMAScript 6 in

    File > Settings > Languages & Frameworks > Javascript
    

    PhpStorm v.2017.2

    0 讨论(0)
提交回复
热议问题