''node' is not recognized as an internal or external command,' in vscode - node.js

I'm working on setting up the Suitecloud Development Framework in the NetSuite instance for my company. I've installed Node v16.13.0, npm 8.1.0, and suitecloud 1.3.1.
Running node -v, npm -v, etc. all works from cmd but will throw a not recognized error when I use the terminal in VSCode.
I can get my VSCode to identify node with
SET PATH=C:\Program Files\Nodejs;%PATH%
but this only fixes it for the session and still doesn't give me access to run anything from suitecloud.
I've checked my Environment Variables as per every other help section I've found for this issue but I have 'C:\Program Files\nodejs' in both my user PATH variable any my system PATH variable.
I've tried running VSCode as Admin on the off chance that would fix it, but that didn't solve anything either.
Thank you for your time, hopefully I'm overlooking something simple due to my inexperience with the terminal.

Leaving VSCode overnight and then rebooting seems to have fixed it. I can't explain why, but if you're encountering the same issue I recommend walking away and coming back to it after a long delay.

Related

Cannot start npm serve on MacOS, IntelliJ ultimate on vuejs project

I am failing to start npm serve at Run/Debug Configuration in IntelliJ.
But doing it separately in Terminal within IntelliJ or on plain console works.
What's going on? How to solve that?
Here's what the Run console shows:
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run serve --scripts-prepend-node-path=auto
> pwdstorage#0.1.0 serve
> node_modules/.bin/vue-cli-service serve
env: node: No such file or directory
Process finished with exit code 127
As mentioned before running the command
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run serve --scripts-prepend-node-path=auto
on a terminal will properly work; even in IntelliJ.
At IntelliJ/Preferences.../Languages & Frameworks/Node.js and NPM the Node interpreter is set to /usr/local/bin/node and the Package manager is set to /usr/local/lib/node_modules/npm They both do exist.
What the frag is going on?
I would love to get a deeper understanding of the whole thing and do appreciate any inseide views on this.
The issue is that node is not on your $PATH; on MacOSX the environment variables differ between GUI applications and within the terminal. Terminal environment is only available to applications started from terminal.
To solve this problem, IDEA tries to load terminal environment by executing some scripts on startup, but it seems that it can't retrieve all needed stuff in your case - thus the issue. As a workaround, you can try starting IDEA from terminal.
Some links you may find useful: http://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks, http://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications.. The problem is that the way to define system-wide environment variables on Mac changes from one version to another (even minor system updates may break your environment)
As lena answered, it did help. Thank you for your help!
Starting it from the terminal does the job.
In my case I build a starter script
#! /bin/bash
/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea &
I am running the ultimate version of IntelliJ. The CE version does have another path to start!
The next two nice things to have would be
to have the opened terminal window automatically closed
link it with a proper icon placed on the desktop.
If anyone can help, go ahead!-)

Node.js - "node" command works, but not when through another framework

I have Node.js + NPM installed; I can run node -v in my console and get back the current version.
I have also tried using NVM Windows as a Node.js version manager and can run both node -v and npm -v there as well.
HOWEVER, when trying to use another framework like Gulp or Ionic or whatever, I keep getting the error:
'node' is not recognized as an internal or external command,
operable program or batch file.
node is obviously a cmdlet as I can run node -v.. but somehow my other frameworks are no longer able to find it.
Path is correct and everything looks good.
What am I missing here?
The program ConEmu for windows terminal management wasn't pulling or allowing programs to access the paths through subcalls or something it seems. I tested with CMD and Powershell respectively and both worked as expected.
I couldn't get ConEmu to seemingly pass these path to subroutines.. so I uninstalled it and found an alternative called Cmder that is built on ConEmu and it was able to pick them up just fine.
I don't know specifically if it was just a setting in ConEmu I couldn't find or if I needed to manually add these--but happy knowing Cmder just does it automatically.

Node isn't recognized

Referring to the above picture, can someone please tell my why my NPM script would continually fail saying that node is not recognized.
nodejs is clearly in my $PATH and it correctly identifies where it is on my computer outside of an npm script.
I am using Git Bash inside ConEMU on Windows Version 10.0.17134 Build 17134.
I wouldn't be surprised if the issue is with Windows, as the problem seems to have popped up since the latest OS update, installed just over a week ago (I've been having this issue for around that same amount of time)
I have finally got it working! It is, unsurprisingly, a Windows issue.. Because I had a few entries in my $PATH, and the nodejs one was at the end, Windows would silently fail when reading the entire path, and not get as far as the nodejs entry. The fix was to move the nodejs in the Environment Variables control panel to the very top

Node & Npm not recognized by WebStorm's terminal

I have paths to Node and NPM in both my user defined environment variable PATH and in system variable Path.
For node: C:\Program Files\nodejs
For npm: C:\Users\Username\AppData\Roaming\npm
Now node and npm are recognized by Windows Command Prompt but not by WebStorm's terminal. I get error:
'node' is not recognized as an internal or external command
Does anyone know what is problem? I could use WebStorm's terminal normally till today, but something went wrong and now I'm stuck.
EDIT:
echo %PATH% screenshot:
Settings/Tools/Terminal
screenshot:
I had similar issue. I had to select File -> Exit from the IntelliJ application as opposed to using IntelliJ's internal restart option: File -> Invalidate Caches / Restart -> Just Restart.
I had the similar problem like this.I was working with my project with another computer. and after that i decide to work with this project with my computer.so after moving the Files of project. i installed the Node.js and i had all of the paths about Node but when i was want to Run the project. i had this problem. i search a lot but nothing works. so i guess maybe when i restart my computer the new paths of variable system will work well. i restarted and my problem solved!
For those who are encountering this problem when you try to edit the run configuration, you have to put "start" as the command instead of "npm". By default Webstorm knows it's a npm project so it already starts with npm, you simply have to put the start command after that.

Getting Node to work on windows 7 enterprise

For the better part of a day now I've been trying to get node.js to work on my computer.
Even though I get no errors during installation, whenever i try to run node or npm from the command line I only get the error "Evented I/O for V8 JavaScript has stopped working" and then nothing happens.
I really have no clue why it isn't working and what I have to do to get it to work! Has anyone else ever had the same problem and were you able to fix it somehow?
It seems the problem was with ansicon which I installed together with cucumber.
I was able to fix the problem by running "ansicon -u" in my x64 folder

Resources