npm安裝windows-build-tools時卡在Successfully installed Python


npm安裝windows-build-tools時卡在Successfully installed Python

在使用vue.js的過程中,我們經常遇到缺少python2.7和VS 2017等構建工具,在網絡上查閱相關教程后,得知需要安裝windows-build-tools工具,但在安裝過程中很多人都遇到Windows PowerShell中卡到Successfully installed Python時不動的情況。

解決步驟

  1. 運行npm install -g windows-build-tools

    npm install -g windows-build-tools
    
  2. 在環境變量中找%temp%文件夾下的dd_installer_XXXXXX.log文件(如:dd_installer_20210824256821.log

  3. 查看此文件,確保日志中輸出了Closing the installer with exit code 0。

    Closing the installer with exit code 0
    
  4. 確保你安裝了Visual Studio Build Tools,在開始菜單里查找Visual Studio Build Tools是否安裝完成。

  5. 在%temp%目錄下創建一個名為dd_client_.log的文件

    dd_client_.log
    
  6. 編輯5中創建的文件,加入一行Closing installer. Return code: 3010.然后保存。

    Closing installer. Return code: 3010
    

注:%temp%文件夾默認時為C:\Users\【用戶名】\AppData\Local\Temp,如我的就是

C:\Users\admin\AppData\Local\Temp

參考資料:https://github.com/felixrieseberg/windows-build-tools/issues/244


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM