npm安裝windows-build-tools卡在Successfully?installed?Python2.7
npm安裝windows-build-tools時(shí)卡在Successfully installed Python 2.7
如果你找到了這里,說明你之前看過的博文都是沒有效果且沒有任何意義的。因?yàn)槲野凑掌渌慕坛淘囼?yàn)了一下,根本沒有任何效果。
這其實(shí)是windows-build-tools安裝腳本的一個(gè)BUG,我在其github的issue中找到了這個(gè)
鏈接:https://github.com/felixrieseberg/windows-build-tools/issues/244
有興趣的可以直接打開看原文,以下為我的翻譯
“Windows-build-tools腳本存在問題,無法找到VS構(gòu)建工具安裝程序的日志文件。似乎VS構(gòu)建工具安裝程序創(chuàng)建的日志文件已更改。該腳本正在文件夾%USERPROFILE%\ AppData \ Local \ Temp中尋找名稱以dd_client_開頭的日志文件,但是VS構(gòu)建工具安裝程序似乎并未創(chuàng)建任何以dd_client_開頭的文件。”
解決步驟
1、運(yùn)行npm install -g windows-build-tools
2、在%temp%文件夾中找到最新的文件名類似于dd_installer_20210421124746.log的文件
3、查看此文件,確保日志中輸出了Closing the installer with exit code 0
4、確保你安裝了vscode
ps:其實(shí)可以直接跳過2–4步,因?yàn)槟愕膒ython環(huán)境早就安裝好了,重復(fù)的步驟安裝程序早就執(zhí)行完畢了
5、在%temp%目錄下創(chuàng)建一個(gè)名為dd_client_.log的文件
6、編輯5中創(chuàng)建的文件,加入一行Closing installer. Return code: 3010.然后保存。
然后windows-build-tools就可以繼續(xù)安裝了
注:直接在資源管理器中粘貼%temp%即可打開你的Windows temp目錄。
renren-fast-vue無法運(yùn)行相關(guān)問題匯總
vscode安裝npm過程匯總
提示:這里可以添加學(xué)習(xí)目標(biāo)
例如:一周掌握 Java 入門知識(shí)
1、npm:error MSB3428: 未能加載 Visual C++ 組件“VCBuild.exe”
原因:未使用管理員權(quán)限打開vscode導(dǎo)致未能加載
解決:
以管理員權(quán)限運(yùn)行vscode npm install --global --production windows-build-tools npm install -g node-gyp
2、npm install Error: not found: python2:
原因: 與上文類似,由于未安裝 windows-build-tools導(dǎo)致
解決:
npm install --global --production windows-build-tools npm install -g node-gyp
3、npm install 報(bào)錯(cuò):error MSB4019: 未找到導(dǎo)入的項(xiàng)目“D:\Microsoft.Cpp.Defa ult.props”
解決: npm install --global --production windows-build-tools
4、renren-fast-vue無法運(yùn)行相關(guān)問題解決辦法n ./src/assets/scss/index.scss Module build failed: Error: ENOENT: no su
解決:
npm uninstall --save node-sass npm install --save node-sass
5、Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (83)
與第四點(diǎn)相同:卸載再安裝node-sass
6、安裝windows_build_tools一直處于still waiting for installer log file …中
現(xiàn)象:安裝windows-build-tools時(shí)python2已安裝完畢,但是windows_build_tools一直暫停再still waiting for installer log file
運(yùn)行指令:
npm install --global --production windows-build-tools@4.0.0
有可能人會(huì)有錯(cuò)誤提示,這是直接運(yùn)行項(xiàng)目
npm run dev
如果出現(xiàn)了問題4的情況,按照問題4解決,項(xiàng)目就可以跑起來了 。
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
node.js中使用node-schedule實(shí)現(xiàn)定時(shí)任務(wù)實(shí)例
這篇文章主要介紹了node.js中使用node-schedule實(shí)現(xiàn)定時(shí)任務(wù)實(shí)例,包括安裝方法和4種使用例子,需要的朋友可以參考下2014-06-06
Node.js實(shí)現(xiàn)鏈?zhǔn)交卣{(diào)
這篇文章介紹了Node.js實(shí)現(xiàn)鏈?zhǔn)交卣{(diào)的方法,文中通過示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-07-07
Nodejs對(duì)postgresql基本操作的封裝方法
今天小編就為大家分享一篇Nodejs對(duì)postgresql基本操作的封裝方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2019-02-02
node中的__filename和__dirname的使用詳解
本文主要介紹了node中的__filename和__dirname的使用詳解,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-03-03

