-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run Node in integrated terminal #13671
Comments
@inforexperience the integrated terminal does very little with your commands, it simply pipes them to and from cmd.exe. To start looking into this I would diff a regular cmd.exe window's environment variables (the ones you mentioned) with that of the integrated terminal. |
I had this issue and have figured out what was causing it for me at least. When VS Code is run, the PATH environmental variable is captured at the time that it is launched. If you then install node.js, this adds the Node bin folder to your path. However, any terminals launched by VS Code, either embedded or external, have the old PATH so trying to run node or npm gives you a message:
A restart fixes the problem. Might it be an option to refresh to PATH on launching a cmd.exe process to avoid this problem? |
@BernieSumption VS Code is launched under a certain environment which includes the I'll assume this is what the OP was experiencing too. |
I had this issue and i have fixed by modifying |
Steps to Reproduce:
Expected outcome would be that the Node CLI starts.
Instead the terminal is unable to recognize node as a command (works in regular cmd windows, both elevated and regular)
The PATH Environment variable in the integrated terminal contains unresolved references to Environment variables %NVM_HOME%;%NVM_SYMLINK%;
When examining Environment variables these are set correctly within the integrated terminal
NVM_HOME=C:\Users\Anders\AppData\Roaming\nvm
NVM_SYMLINK=C:\Program Files\nodejs
Is the integrated terminal interpreting environment variables differently that the regular cmd Shell in Windows?
The text was updated successfully, but these errors were encountered: