How to add Node.js path in WebStorm using Linux - node.js

I am using WebStorm 19.3.1 on Linux Mint Cinnamon 19. I am trying to add a path for node.js to debug my code in WebStorm. The path for node.js is /usr/bin/nodejs, when I go to this directory I can find nodejs file there, but when I open WebStorm and try to access this path from there, It doesn't show node.js file inside.
The permissions for node.js are Read And write, should I add execute too for the root?
If you know how to solve the problem please help me to fix it out.
Thanks in advance.
I've seen people on internet simply opening the path from Webstorm, but in my case it doesn't show.
https://www.youtube.com/watch?v=U7ydvEh9WLQ check out this link.
//There is no code actually
Expecting to have configurations correctly set up)

Related

command prompt when i try install any dependence

when I try to install any dependence in command prompt get this error message and tried to google but nothing any one to help me please
please I need help someone to help me
try installing locally. and add this path to your system variable: C:\Program Files\nodejs
Reinstall the node.
You have two ways to install Node.js on your computer.
Option 1 – Setup by running the .msi installation file
Its a typical Windows installation and automated. No need to add
entries in environment varaiable
Option 2 – Setup by extracting .zip file
This method does not require admin access and can be used to install
on nodejs on a system on which you dont have admin access such as you
official laptop or desktop.
Removing nodejs is as simple as deleting the folder. You will have
to add entries in environment variable if you want to execute node
command from any location in windows command prompt. https://nodejs.org/en/download/
Based on the screenshot.your access is denied.Would suggest starting the terminal as an administrator before running the command.

Location of NodeJS standard library

Can someone please help me find the location of standard NodeJS modules like http or fs?
When I write:
const http = require('http');
Where is the module coming from? For NPM this is easy to find, but strangely I can't find http.js or any other standard library file.
The actual running node location can be found with this command
node -e "console.log(process.execPath)"
this will output the executed bin compiled nodejs path. which will not really much help you.
what will help you is knowing the node version you are running and check the source code of the module you want. http.js .
or debug nodejs in real time.
break point on the http module and then get into the module itself with the help of the debugger. check out this guide
Well this depends on which operating system you are using:
If you are on windows it's in C:\Program Files\nodejs\node_modules\npm\node_modules or at least I think...
If you want to know on linux check out this question on the askubuntu.com website. In this question, someone answered that it was in
/usr/local/lib/node or /usr/local/lib/node_modules
Tejas Lotlikar
There is a high chance that on mac, the location is the same as linux because macOS is based upon some "ancient" linux dist.
EDIT : If you have a custom installation path then (of course) nodeJS is in the folder you unpacked it. You can also check your user/system variables aka environment variables.

Spyder external system terminal does not work (Python3.6)

I am not sure if this is a right place to ask this type of questions. I am a python beginner or programmer overall at this point. I am using Spyder to use python 3.6 (via Anaconda). I wrote a code that works fine when I run it in the current Ipython console. But I really need to run it in an external system terminal. In order to do so, I chose the following path: Run-> configuration per file -> execute in an external system terminal. That has been working fine. But now it refuses to work!
I validated that there is nothing wrong with my code by running something simple and saw that running via external system terminal does not work.
So far I deleted Anaconda and re-installed it. Could someone suggest what I should be looking for to diagnose the problem and fix it?
Thanks!
I had the same problem and noticed that unless the Working directory settings is set to "The directory of the file being executed", it won't work.
You can change it in "Run" > "Run configuration per file".

Cannot run 'phonegap' command on Win 7

I've just installed phonegap on Windows 7, following the instructions on their website. However, whenever I try to run a simple 'phonegap' command, I get the error:
'phonegap' is not recognized as an internal or external command
I put the phonegap path at the enviroment variables 'PATH' but that didn't do anything at all.
I've also made sure WSH was enabled, but still nothing works.
Am I missing something?
It may just be that the path has not been updated (Have you restarted your machine?)
Alternatively, you can copy the path onto the clipboard, then in a cmd window, do the following:
set path=%path%;<Your path here>
Which will include it in your path for the current session only.
Figured this out...I accidenatlly deleted some nodeJS variables while adding ant and java pathes. Had to reinstall node to realize this.

Adding blackberry10 platform in cordova(3.0.0) is showing "Error: node cannot be found on the path. Aborting"

I had installed blackberry 10 required software.
Error: node cannot be found on the path. Aborting.
I'm having the same problem. It works when I specify android but not when I specify blackberry10.
As pointed out by Ludivoc above, node is in my path. My command sequence is:
mydir>cordova create test com.example.test Test
mydir>cd test
mydir\test>cordova platform add android
mydir\test>cordova platform add blackberry10
[Error: node cannot be found in path. Aborting.
]
mydir\test>where node
C:\Program Files\nodejs\node.exe
I have also verified that the bbndk is in my path:
mydir\test>where blackberry-signer
C:\bbndk\host_10_1_0_238\win32\x86\usr\bin\blackberry-signer
C:\bbndk\host_10_1_0_238\win32\x86\usr\bin\blackberry-signer.bat
FWIW, I'm running Windows 7 Professional (64bit)
It seems to me that this problem is specific to the cordova scripts for blackberry10 and not to the node installation.
SOLVED: I've had some luck with this problem and there is an answer posted on my thread at http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/lt-img-gt-images-not-being-cached-in-BB10-Webworks-app/m-p/2649771/highlight/false#M41350. The thread actually discusses another problem, but I was able to get this one solved as well (I think:-)). Essentially, you have to make some edits to the init.bat file at C:\Users\.cordova\lib\blackberry10\cordova\3.1.0\bin
We had the same problem and managed to fix it.
The first problem "Error: node cannot be found on the path. Aborting." is related to a file called check_reqs.bat which can be found in the .cordova dir, normally situated in your users home eg. C:\Users\.cordova\lib\blackberry10\cordova\3.1.0\bin\check_reqs.bat
This script tries to check for some files using a variable called %CORDOVA_NODE% e.g.
if not exist "%CORDOVA_NODE%\node.exe" (
No matter what I do, this variable is NEVER set when I call cordova so I just set it by hand
SET %CORDOVA_NODE%=somepath_dont_use_quotes
You might also have to adjust %CORDOVA_BBTOOLS%, on one of our machines it worked, on one it didn't, I was NOT in the mood figuring out why.
The same CORDOVA_NODE issue has to be fixed in your build.bat situated at
\platforms\blackberry10\cordova\build.bat
Last but not least we had a problem in packager.js. There is a logger used in there which gives an error whenever the packager tries to call it so we just put it under comments.
I know this is a little bit of a hack us the %CORDOVA variables should be taken from your system but as those paths shouldn't change we are h appy with the solution.
Open the check_reqs.bat file under C:\Users.cordova\lib\blackberry10\cordova\3.1.0\bin\check_reqs.bat and:
replace %CORDOVA_NODE% with your path to nodejs, mine is C:\Program Files\nodejs.
Then repalce %CORDOVA_BBTOOLS% with the path the blackberry sdk, mine is: C:\bbndk\host_10_2_0_15\win32\x86\usr\bin.
Finally replace the last line "%CORDOVA_NODE%\node" "%~dp0\check_reqs.js" %* by "C:\Program Files\nodejs\node.exe" "%~dp0\check_reqs.js" %*
It works for me
I believe you would get this error if 1) you have not installed node.js or 2) you have installed node.js but not yet added it to your system path.
These two pages provide further detail that may be helpful:
http://cordova.apache.org/docs/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface
http://cordova.apache.org/docs/en/3.1.0/guide_platforms_blackberry10_index.md.html#BlackBerry%2010%20Platform%20Guide
If you install nodejs in the default location, it should be installed in a location that is already in the system path on MacOS
i have updated cordova to 3.2.0,now everything is working fine in win7.
Thank you all
Have u downloaded the Blackberry SDK. You have install the blackberry sdk manually from blackberry's website. only then u can use it in phonegap.
This error occurs in C:\Users\{username}\.cordova\lib\blackberry10\cordova\{version}\bin\init.bat
The fix for me was to add a new environment variable:
Name: CORDOVA_BBTOOLS
Value: C:\Program Files\BlackBerry\BB10 WebWorks SDK 2.2.0.15\cordova-blackberry\bin\dependencies\bb-tools\bin
Your path might not be the exact same. If you can't find it do a search for blackberry-nativepackager.bat and the folder that contains that is the directory you need to set as the value.

Resources