I tried this
.save myShell.js
that is followed by this error:
Failed to save:myShell.js
why do I get this error ?
I save the situation with the start of the node.js command promt.
By windows install you get (so was after install on my sys) some several shortcuts , one with the node.js icon and it's name ist Node.js and another that is called Node.js command promt - if you want to use the .save command to save the session you must to run the "Node.js command prompt".
Of course with some more work you can get more.
Permissions issue.
2 options:
Run "Node.js" app as administrator (right click on the icon in the start menu "run as admin"
Run "Node.js Command Prompt" app and then type "node" which will put you in REPL
Related
In Angular 5, after creating project folder, installing Angular CLI, Node.js (all latest versions) and ng serve was compiled successfully through command prompt. Then I tried to use command prompt to install bootstrap. I could not control / use command prompt. What might be the cause and effect?
Command prompt stuck after compilation
There are simple ways:
If you use Command Prompt(Terminal), open another Command Prompt inside your project path.
If you use IDE like Visual Studio Code, open Terminal and then you can use Plus(+) sign for openning anothor Terminal like below image:
If you use IDE like WebStrom (Jetbrains IDE), first open IDE Terminal then make right click and select New Session and new terminal openning like below image:
There are couple of ways you can do that.
The official way of deployment of angular app.
Create a start.bat (if you are using windows) and write the ng serve --open command there. Now you can run this file which will internally run your angular app, using forever or pm2 npm modules.
If you do that these will demonise your process to run in background and your same command prompt becomes usable again.
Once the process is finished( compiled successfully), you would notice that the cmd -prompt newline doesn't show any directory and its blank.
This means that, you just have to open an another (new terminal), get to the right directory using "cd command "and implement your desired commands or operations again.
use ctrl + v it will ask weather to terminate say Y, cursor will go back
I'm very newby in node.js world, and I'm doing the first steps, but I can't step forward because when I try to do any operation from node.js command prompt in Windows 10, the node.js console is opened and closed very fast and I haven't time enough to read the errors or anything that is written on console. Is there any way to configure node.js to stop the console before to quit it? Or to execute on same opened Node.js command prompt.
For example I'm unable to read the version of different modules installed, the console opens and closes very fast.
I've tried windows standard command line, node.js command prompt, an application called cmder, and in all instructions related to node it throws a new window with node.exe. If the command waits user prompt the console (node.exe) is paused, but when I try an application that only log some data (like npm --version) I can't see the result, because after log, the console is closed.
Some time ago, I've tried in Windows 7, and I remember that the node prompt was opened on the same command console. I don't know if it's the SO, or the node.js version (4.4.4 LTS).
Ouch! I've found the solution, I was trying to avoid the annoying "run as administrator" dialog and I've configured the node application properties checking the flag "Compatibility > Run This Program As An Administrator". That was the source of all my problems!
Hope it helps anyone!
I installed Tortoise on Windows 10 (my user had admin privileges but installer wasn't ran as admin), and when trying to use any tortoise contextual menu, I was getting this error:
"TortoiseProc Launch failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail."
I verified, "run as Administrator" was not checked for TortoiseProc.exe file. I tried to check it, but this didn't change anything.
So I decided to uninstall it, and install it again. And then I was having this error:
a dialog saying the TortoiseProc.exe requires elevation
Now, when attempting to run the app by double clicking on TortoiseProc.exe, I got a prompt saying this app required privilege admin. Clicking on OK ran it properly. So I guess the prompt isn't displayed when calling it from a contextual menu, and it silently fails.
I fixed the problem by right clicking on TortoiseProc.exe file -> proporties. Then, on the Compatibily tab, I clicked on "Run compatibility troubleshooter". And voila! It fixed the problem: TortoiseProc.exe now runs, and does not ask any admin rights!
Run the Command prompt (cmd.exe) with admin rights and run this command:
SxsTrace Trace -logfile:SxsTrace.etl
Now run the Tortoise program which causes the SideBySide error.
Go back to the command prompt press ENTER to generate the SxsTrace.etl. Now type this:
sxstrace Parse -logfile:SxSTrace.etl -outfile:SxSTrace.txt
Now open the SxSTrace.txt trace and look which VC++ runtime is missing. Go to Microsoft.com, download and install the required version.
If you are unsure, please upload the complete SxSTrace.txt here.
I have a question about usage of Nodejs.
I installed it on Win7 and run (green Node.js icon) it, but when I tried to run "npm install" command it dodn't work. I had to move to Nodejs command prompt where npm is working.
Is that how it supposed to work?
Once you install NodeJS under Windows, it goes into the global PATH, meaning that it is available in the usual Windows command prompt. So, just open one by pressing:
Windows+R
Type cmd and press Enter
Then type node -v. You should be able to see an appropriate response.
Add your AppData\Roaming\npm and Program Files\nodejs folder to your path.
Also have a look at this:
Node.js doesn't recognize system path?
Second answer helped me to add my Roaming folder.
I'm trying to learn Node.js. I really like a lot of the ideas I've seen. Currently, I have "Hello, World" working. To run hello world, I simply type node hello.js from a windows command prompt. Now, I'm trying to integrate Node in with Visual Studio as a Tool. Essentially, I want to be able to click the "TOOLS" menu in Visual Studio and choose "Node", and my currently selected file will run in a Node environment.
My question is, how do I do this? Currently, I have the following external tool configured:
Title: &Node
Command: C:\Windows\System32\cmd.exe
Arguments: node $(ItemFileName)
Initial Directory: $(ItemDir)
When I choose "Node" from the "TOOLS" menu, a command prompt window is opened. The directory is set to the directory of the file I've chosen. However, the command "node [filename]" doesn't get executed or entered. What am I doing wrong?
So I replicated the issue you've experienced so I've tried to simply point it to node.exe instead and seems to work pretty well ;)) Will probably end up using this as well!