I do most of my work in python but we also have a node.js project that I work on so I was pleased to find that PyCharm supported the Node.js plugin.
After I installed it I was still having significant troubles getting a lot of the core node.js libraries and statements to be recognized by PyCharm. Most notably, PyCharm doesn't recognize the require or module statements.
Any ideas on what I could do to fix this?
Found the answer! In the Javascript tab of your project settings open the Library subtab. In there make sure you have the Node.js Core Modules and Node.js Globals checked as shown here.
Related
I am new to visual studio code and Node.js and also install Node and npm to my computer.
My problem is VS code does not suggest any node syantax.
I watch youtube tutorials to learn node and in the video, instructors VS code suggest node js syntax.
Based on: https://code.visualstudio.com/docs/editor/intellisense it should have intellisense come right out of the box within VS code. I would recommend uninstalling and reinstalling VS code.
Some other gotcha's or things which may help:
Intellisense for javascript only works within files that are labeled with the .js extension
The hotkey Ctrl+Shift+brings up a terminal which contains aProblems` in there you can see the problems of the Workspace which may show some additional information regarding what is failing.
I am new to Node.js and I am using WebStorm as my IDE since I've used PhpStorm in my old php days and I've found it great.
What I noticed is that the autocomplete and suggested key words, functions, properties... in WebStorm in Node.js projects is far from being accurate or helpful while it was extremely helpful in PhpStorm making development really intuitive.
Is there anyway to make WebStorm more helpful to Node.js developer?
Webstorm is mainly for web with focus on Javascript, there are some plugins (from the settings menu) that you can install for node js.
I trying to write test scripts using HttpLibrary (from robot framework) on Eclipse RED editor and below are the steps i have performed -
Steps performed
Installed robot framework HttpLibrary using below command
pip install --upgrade robotframework-httplibrary
From Settings-> Imports, added HttpLibrary to my script
* Settings *
Library HttpLibrary
'Unknown 'HttpLibrary' library. Try to use Quick Fix (Ctrl+1) or add library to red.xml for proper validation' error message is noticed on hovering the HttpLibrary line in my script.
However upon looking at Red.xml ->Referenced libraries tab, HttpLibrary is listed in the libraries block HttpLibrary in Red.xml
I am wondering if there is any different procedure to add libraries to Red.xml. I am stuck on trying different ways to add HttpLibrary to my script.
After few hours of investigation, i have found root cause of the issue.
I am using Python 3.6.4 in my machine and installed Robot Framework on it.
HttpLibrary supports only Python 2 and so though the library is listed in the Red.xml referenced libraries tab, still my Robot Framework script was not able to reference and run it properly.
Please note that not all the Robot Framework libraries are supported by Python 3.6.4
This occasionally happens. Even when the library is already present in the project config file (RED.xml) and present in the project tree panel. Using CTR+1 and opting for the quick fix option will generally correct this issue without any visual difference.
In the HttpLibrary Github documentation there the usage section also highlights that the library should be imported like:
*** Settings***
Library HttpLibrary.HTTP
This gives a different result.
I'm just starting out trying to integrate Ensime scala ide-support into vscode. I have pulled out some of the integration parts from my atom package https://github.com/ensime/ensime-atom into https://github.com/ensime/ensime-node.
However, when depending on this from vscode I get red squigglies that it can't be found:
However, code still build and runs just fine. I got worried. I found this:
Q: Can I use native Node.js modules with my extension?
A: A Visual Studio Code extension package contains all of its
dependencies. This means that if you develop your extension on Windows
and depend on a native Node.js module when you publish that extension,
the Windows compiled native dependency will be contained in your
extension. Users on OS X or Linux won't be able to use the extension.
The only way to make this work for now is to include binaries for all
four platforms of VS Code (Windows x86 and x64, Linux, OS X) in your
extension and have code that dynamically loads the right one.
What does this mean? I can't use fs, net, child_process and the like? Kindof need them all I think or does vscode provide all that through abstraction layers?
You do have the basic node modules (fs, etc) already included as part of the dependency of vscode itself.
Did you remember to include this module in your package.json file as a dependency?
A way to check this would be to clean your code, put it in a new folder, and run "npm install" - if everything then runs fine, you are good to go.
See this docs:
https://code.visualstudio.com/Docs/extensionAPI/extension-manifest
Be sure to also read up on the new extension authoring update in the latest version: https://code.visualstudio.com/Updates
I've tried building a basic node.js ES6 module test project in Visual Studio 2015. But I get build errors and cannot run or debug the application in VS.
Have I just came to the party too early?
If it's worth anything I have tried opening and building the project in both VS2013 (Update 3) and VS2015 RC.
I have installed:
Node.js 0.12.2
Node.js Tools 1.0 for VS2013
Node.js Tools 1.1 Beta for VS2015
Additionally, I have added Robert Penners () node.d.ts gist to get over the import syntax errors.
See: https://gist.github.com/robertpenner/7d48f184df1236c4fdca
I have uploaded the project for others to try: https://dl.dropboxusercontent.com/u/10159140/es6-modules-ts.zip
Node Tools dev here. Thanks for reporting this. Indeed, we support the ES6 typescript target type.
That said, I'm running into issues running your app in the command line altogether with the latest versions of both node and io.js, so this may be a level of ES6 support mismatch between all the components at play here... Have you managed to successfully run your app in the command line (without the debugger)? Otherwise it may be related to this discussion:
https://github.com/nodejs/io.js/issues/1000
Once you figure that out, be sure to set up your project with the right node.exe arguments (harmony flag and whatnot) in project properties, so Visual Studio knows how to run it too.
Hope that helps!
P.S. just an fyi - we've moved to GitHub now, so please post issues there (rather than on CodePlex) for the quickest responses.
https://github.com/Microsoft/nodejstools