WebStorm says console is an unresolved variable - 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

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

For version 8 and up the solution is to enable NodeJS Globalslibrary:
Settings > Javascript > Libraries

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

For me worked to change Javascript Language Version to ECMAScript 6 in
File > Settings > Languages & Frameworks > Javascript
PhpStorm v.2017.2

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

For my Version (WebStorm 2021.3) it was under Languages & Framework => Node.js and then check Coding assistance for Node.js.

Related

Can't run tslint-eslint-rules for TSlint in WebStorm 2016

I have installed TSLint and it works just fine with WebStorm 2016.
But after this I have tried to install tslint-eslint-rules. Followed instructions on github and added "rulesDirectory": "node_modules/tslint-eslint-rules/dist/rules" to my custom tslint.config file. But still tslint-eslint-rules seems not to work you get an error in WebStorm
(node_modules\tslint\lib\ruleLoader.js:29 throw new Error....)
Can somebody confirm that this eslint ported to TypeScript rules actually can't work with standard TSLint or is this some sort of WebStorm 2016 problem?
Works for me.
Please make sure that your local tslint package is specified in Settings | Languages & Frameworks | Typescript | TSLint, TSLint package:, and that path/to/project/node_modules/tslint-eslint-rules/dist/rules is added to 'Additional rules directory:' there.
Also, try re-opening the project after changing your settings

Content Assist in Android studio with C\C++ is not working

I have Android Studio 2.1.2, Android SDK 25, Andriod Ndk 11. Project starts and compiles well from Android Studio, but I couldn't use IDE, cause there is no Content Assist - ctrl+space and ctrl+click is not working in C\C++ sources for include and functions, the only message is - "cannot find declaration to go to" like here:
Somebody know how to solve the problem? For java sources everything works fine.
First Install the NDK bundle from Tools -> Android -> SDK Manager
Import the hello-jn sample using File -> Import Sample (Note: This sample is using the new gradle-experimental plugin)
Click Run -> Edit Configurations... and and a new Android Native configuration
Run and Debug Your App
I also have this problem! My solution is to re-set NDK path in "local.properties".
When i use default ndk path (ex: ndk.dir=C:\Users\%user\AppData\Local\Android\Sdk\ndk-bundle sdk.dir=C:\Users\%user\AppData\Local\Android\Sdk ) , I will have the same problem. So I download other NDK (from google official web-site) ,and set "ndk.dir", and I sloved.
You can try it~ maybe helpful for you.
ps. I use NDK version:14 , will happen this. I use v13 or v12 will solved.

How to make JetBrains webstorm know about `element`, `by` in protractor test spec?

Right now in my Protractor test spec, Webstorm is complaining that all my element and by are "Unresolvable type or element"
Have you enabled the TypeScript library for angular-protractor?
Go to Project Settings > Javascript > Libraries
Click Download then select TypeScript community stubs
Find angular-protractor then download and install
Hope that helps! I know it's not native support but next best thing :-)
angular-protractor no longer appears on the list of TypeScript community stubs, presumably because protractor is now officially supported within the WebStorm IDE.
So, in order to ger protractor code completion:
Install protractor globally: npm install -g protractor
On WebStorm, go to Project Settings > Javascript > Node.js and NPM, and make sure protractor appears in the package list.
On Project Settings > Javascript > Libraries, click the Add... button and point WebStorm to the protractor directory in your global node_modules. In my Mac's case it's /usr/local/lib/node_modules/protractor.
Ron H´s Answer worked for me, but i also had to download and install the following packages from the TypeScript community stubs.
selenium-webdriver
jasmine
karma-jasmine
After that also by.id(), by.className(), iit, ddescribe, toBeTurthy(),... was recognized.
You could localise variable for your scope:
var element = protractor.element;

Setting up Nodejs for WebStorm

I've been trying all say to get syntax and autocomplete working in WebStorm. I've installed WebStorm 7 EAP. Right now, I'm trying to get this simple script to highlight properly:
How do I get WebStorm to accept app.listen(3000)?
I think the best solution which became available in one of the recent EAPs is to download library via Setting | JavaScript | Libraries | Download. Select TypeScript community stubs there and add express.js. TypeScript library file will improve completion and highlighting in pure JavaScript project. Also please see WEB-8801.

Cygwin and Eclipse Helios setup

I am trying to learn C++ with Cygwin and Eclipse Helios.
I got all the development tools under Cygwin installed; and installed the CDT package for Helios.
The problem is I don't see an option to create a C++ project from makefile or any other option. I can only see options for a C Project, C++ project and a new project from existing source code.
Here is what I referred to:
Eclipse seminar
Developing applications using the Eclipse C/C++ Development Toolkit
Questions:
Is there any clear guide to setup Eclipse for Cygwin?
Am I missing something in the setup?
any other suggestion will be helpful.
Are you asking how to setup GCC in cygwin + Eclipse? How about this tutorial?
I found this tutorial to be a very good source. It was almostperfect, apart that one more path needed to be add to the folder containing cygstdc++-6.dll which prevented anything to be printed on console. So, add to the Project Properties -> C/C++ General -> Paths and Symbols -> Includes GNU C++ the path to the missing dll folder: ${CYGWIN_HOME}/usr/i686-pc-cygwin/sys-root/usr/bin.