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
[Issue]: NVM for Windows should be run from a terminal such as CMD or PowerShell. #1126
Comments
Only through the terminal? Can Node be supported? |
This is due to a change that identifies the terminal. The change was added in 1.1.12 and has been nothing but a pain for everyone. It will be reverted in the next release, but it may be a little while before the next release (our code signing cert was locked when trying to automate the code signing process and I'm trying to get it unlocked). Revert to 1.1.11 for the time being. The changes between 1.1.11 and 1.1.12 are primarily just debugging. Most people won't experience a difference between the two. |
Thank you, I understand; it is really inconvenient to use Node to develop some functions in version 1.1.12; it seems that the only way is to downgrade the version to 1.1.11; Also hope this issue can be fixed soon; |
Use that powershell script below # change node version
# keep same with .nvmrc version
# used for webstorm adding external-tools when before launch
# used for vscode when task dependsOn
if(Test-Path .nvmrc){
}else {
echo "no .nvmrc file"
return
}
$curVer = node -v
$curVer = $curVer -replace 'v', ''
$cfgVer = Get-Content .nvmrc
if($curVer -eq $cfgVer)
{
echo "no need to switch version"
}else{
# change version
echo "change node version to $cfgVer"
start powershell "nvm use $cfgVer"
# wait 5 second for nvm process run to finish
Start-Sleep -Seconds 5
}
|
What happened?
I want to run "nvm ls" through node:exec or spawn, but now there is a problem: "NVM for Windows should be run from a terminal such as CMD or PowerShell";
Version: 1.1.12, but version 1.1.11 can run normally;
I don't know what is causing the problem? Can I just downgrade the version?
What did you expect to happen?
I think it should be able to output the node version installed on the computer!
Version
1.1.11 or newer (Default)
Which version of Windows?
Windows 10 (Default)
Which locale?
English (Default)
Which shell are you running NVM4W in?
Command Prompt, PowerShell
User Permissions?
I don't know (Default)
Is Developer Mode enabled?
No (Default)
Relevant log/console output
NVM for Windows should be run from a terminal such as CMD or PowerShell
Debug Output
Anything else?
No response
The text was updated successfully, but these errors were encountered: