Windows 10下Node.js安装频繁回滚的解决方法求助
Hey there, sorry to hear you're hitting roadblocks installing Node.js 8 or 10 on Windows 10—especially since it works fine on Linux. Let's dive into some targeted solutions based on what you've already tried and the installation context you shared:
Completely wipe Node.js residuals (beyond the single registry key you deleted)
- Uninstall any partial Node.js installations via Control Panel > Programs and Features. For a deeper clean, use a tool like Revo Uninstaller to remove leftover files and registry entries automatically.
- Delete these folders manually (replace
<YourUsername>with your actual Windows username):C:\Program Files\nodejsC:\Program Files (x86)\nodejsC:\Users\<YourUsername>\AppData\Roaming\npmC:\Users\<YourUsername>\AppData\Roaming\npm-cache
- Clean up remaining registry entries (back up your registry first before making changes):
- Open
regedit, navigate to and delete (if present):HKEY_LOCAL_MACHINE\SOFTWARE\Node.jsHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Node.jsHKEY_CURRENT_USER\Software\Node.js
- Open
Adjust installation permissions and system safeguards
- Always right-click the Node.js installer and select "Run as administrator"—standard user accounts often lack permissions to write to system directories or modify registry settings.
- Temporarily disable your antivirus software and Windows Firewall during installation (don't forget to re-enable them afterward). Many security tools block legitimate installer operations by mistake.
- Ensure Windows 10 is fully updated via Settings > Update & Security. Outdated system patches can cause compatibility issues with older Node.js versions.
Use the offline installer instead of the online one
Download the full.msioffline package for Node.js 8 or 10 from the official website (avoid the web-based installer). When installing, choose a custom path on a non-system drive (e.g.,D:\nodejs) to bypass strict system folder permissions.Reset performance counters properly
Your earlier attempt to disable performance counters didn't work—try resetting them entirely:- Open Command Prompt as an administrator.
- Run this command to reset all performance counters:
lodctr /r - Restart your PC, then try installing Node.js again.
Dig into detailed error logs
If the above steps fail, check the Windows Event Viewer for more specific error details:- Open Event Viewer > Windows Logs > Applications.
- Look for events tagged with "MsiInstaller"—these will include error codes (like 1603) that point to the root cause (e.g., missing system components, corrupted installer cache).
Repair corrupted system files
Run these commands in an elevated Command Prompt to fix potential system file corruption that might be blocking installation:sfc /scannow DISM /Online /Cleanup-Image /RestoreHealthRestart your PC once the scans complete, then retry the Node.js installation.
内容的提问来源于stack exchange,提问作者HeLlOwOrLd




