[Issue]: npm is not recognized as an internal or external command immediately after 'nvm use ___' in batch script... timeout required?
twilson90 opened this issue · 1 comments
twilson90 commented
What happened?
I run a batch script:
nvm use 22.5.1
npm install
But when it gets to the second line it outputs:
'npm' is not recognized as an internal or external command, operable program or batch file.
But if I put timeout 1
before running the npm command, it works.
Apprently it takes a moment for the new 'npm' to become usable... why?
What did you expect to happen?
No error.
Version
1.1.11 or newer (Default)
Which version of Windows?
Windows 11+
Which locale?
English (Default)
Which shell are you running NVM4W in?
Command Prompt
User Permissions?
Standard User, Elevated
Is Developer Mode enabled?
No (Default)
Relevant log/console output
No response
Debug Output
hedge is not using admin or elevated rights.
Command Prompt - nvm debug
Windows Version: 10.0 (Build 22631)
Windows Developer Mode: UNKNOWN (user cannot read registry)
NVM4W Version: 1.1.12
NVM4W Path: c:\Users\hedge\AppData\Roaming\nvm\nvm.exe
NVM4W Settings: C:\Users\hedge\AppData\Roaming\nvm\settings.txt
NVM_HOME: C:\Users\hedge\AppData\Roaming\nvm
NVM_SYMLINK: C:\Program Files\nodejs
Node Installations: C:\Users\hedge\AppData\Roaming\nvm
Total Node.js Versions: 1
Active Node.js Version: v22.5.1
IPv6 is enabled. This can slow downloads significantly.
No problems detected.
Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues
Anything else?
No response
coreybutler commented
See the common issues.