mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	nvm reinstall-packages: On systems where npm ls -g --depth=0 does not include npm for some reason, make sure to filter out (empty).
				
					
				
			This commit is contained in:
		
							
								
								
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -1728,7 +1728,7 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')" | |||||||
|       fi |       fi | ||||||
|  |  | ||||||
|       local INSTALLS |       local INSTALLS | ||||||
|       INSTALLS=$(echo "$NPMLIST" | command sed -e '/ -> / d' -e 's/^.* \(.*\)@.*/\1/' -e '/^npm$/ d' | command xargs) |       INSTALLS=$(echo "$NPMLIST" | command sed -e '/ -> / d' -e '/\(empty\)/ d' -e 's/^.* \(.*\)@.*/\1/' -e '/^npm$/ d' | command xargs) | ||||||
|  |  | ||||||
|       echo "Copying global packages from $VERSION..." |       echo "Copying global packages from $VERSION..." | ||||||
|       echo "$INSTALLS" | command xargs npm install -g --quiet |       echo "$INSTALLS" | command xargs npm install -g --quiet | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user