You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Windows 10下Node.js安装频繁回滚的解决方法求助

Fixes for Node.js Installation Failures on Windows 10

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)

    1. 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.
    2. Delete these folders manually (replace <YourUsername> with your actual Windows username):
      • C:\Program Files\nodejs
      • C:\Program Files (x86)\nodejs
      • C:\Users\<YourUsername>\AppData\Roaming\npm
      • C:\Users\<YourUsername>\AppData\Roaming\npm-cache
    3. 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.js
        • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Node.js
        • HKEY_CURRENT_USER\Software\Node.js
  • 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 .msi offline 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:

    1. Open Command Prompt as an administrator.
    2. Run this command to reset all performance counters:
      lodctr /r
      
    3. 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:

    1. Open Event Viewer > Windows Logs > Applications.
    2. 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 /RestoreHealth
    

    Restart your PC once the scans complete, then retry the Node.js installation.

内容的提问来源于stack exchange,提问作者HeLlOwOrLd

火山引擎 最新活动