Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm says console is an unresolved variable

Tags:

webstorm

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

I am using Node.js

enter image description here

like image 754
Games Brainiac Avatar asked Aug 15 '13 16:08

Games Brainiac


4 Answers

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

like image 189
lena Avatar answered Nov 02 '22 18:11

lena


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

Settings > Javascript > Libraries

like image 26
Ya Basha Avatar answered Nov 02 '22 16:11

Ya Basha


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

like image 12
Computer's Guy Avatar answered Nov 02 '22 18:11

Computer's Guy


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

File > Settings > Languages & Frameworks > Javascript

PhpStorm v.2017.2

like image 2
MKK Avatar answered Nov 02 '22 18:11

MKK