node-sass安裝失敗,安裝后無法使用 gyp verb check python checking for Python executable "python2" in the PATH

E:\works\store-guide-manage-react>yarn install
yarn install v1.16.0
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order
to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @testing-library/user-event@7.1.2" has unmet peer dependency "@testing-library/dom@>=5".
warning "@typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
[-/4] ? waiting...
[2/4] ? node-sass
[-/4] ? waiting...
error E:\works\store-guide-manage-react\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: E:\works\store-guide-manage-react\node_modules\node-sass
Output:
Building: D:\Program Files\node.exe E:\works\store-guide-manage-react\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'D:\\Program Files\\node.exe',
gyp verb cli   'E:\\works\\store-guide-manage-react\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.15.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (E:\works\store-guide-manage-react\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\works\store-guide-manage-react\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\works\store-guide-manage-react\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (E:\works\store-guide-manage-react\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\works\store-guide-manage-react\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\works\store-guide-manage-react\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:13:12)\n    at F (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:68:19)\n    at E (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:80:29)\n    at E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:89:16\n    at E:\\works\\store-guide-manage-react\\node_modules\\isexe\\index.js:42:5\n    at E:\\works\\store-guide-manage-react\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (E:\works\store-guide-manage-react\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\works\store-guide-manage-react\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\works\store-guide-manage-react\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (E:\works\store-guide-manage-react\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\works\store-guide-manage-react\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\works\store-guide-manage-react\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\works\store-guide-manage-react\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:13:12)\n    at F (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:68:19)\n    at E (E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:80:29)\n    at E:\\works\\store-guide-manage-react\\node_modules\\which\\which.js:89:16\n    at E:\\works\\store-guide-manage-react\\node_modules\\isexe\\index.js:42:5\n    at E:\\works\\store-guide-manage-react\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (E:\works\store-guide-manage-react\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (E:\works\store-guide-manage-react\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (E:\works\store-guide-manage-react\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "D:\\Program Files\\node.exe" "E:\\works\\store-guide-manage-react\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\works\store-guide-manage-react\node_modules\node-sass
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0

這個(gè)問題搞了一會(huì)想起開始安裝node-sass時(shí)的一句被我忽略的提示:執(zhí)行npm rebuild node-sass
這行后就可以了

再說說 node-sass 的安裝問題,現(xiàn)在使用 yarn install 時(shí)容易出現(xiàn)node-sass無法安裝的情況,npm也無法安裝。主要還是因?yàn)閴Φ脑颉?br> 出現(xiàn)這個(gè)問題還是去安裝個(gè) taobao 鏡像吧潭枣,雖然我也不太喜歡使用比默。但它能解決這種問題

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市盆犁,隨后出現(xiàn)的幾起案子命咐,更是在濱河造成了極大的恐慌,老刑警劉巖谐岁,帶你破解...
    沈念sama閱讀 219,188評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件醋奠,死亡現(xiàn)場離奇詭異,居然都是意外死亡伊佃,警方通過查閱死者的電腦和手機(jī)窜司,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,464評論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來航揉,“玉大人例证,你說我怎么就攤上這事∶耘酰” “怎么了织咧?”我有些...
    開封第一講書人閱讀 165,562評論 0 356
  • 文/不壞的土叔 我叫張陵,是天一觀的道長漠秋。 經(jīng)常有香客問我笙蒙,道長,這世上最難降的妖魔是什么庆锦? 我笑而不...
    開封第一講書人閱讀 58,893評論 1 295
  • 正文 為了忘掉前任捅位,我火速辦了婚禮,結(jié)果婚禮上搂抒,老公的妹妹穿的比我還像新娘艇搀。我一直安慰自己,他們只是感情好求晶,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,917評論 6 392
  • 文/花漫 我一把揭開白布焰雕。 她就那樣靜靜地躺著,像睡著了一般芳杏。 火紅的嫁衣襯著肌膚如雪矩屁。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,708評論 1 305
  • 那天爵赵,我揣著相機(jī)與錄音吝秕,去河邊找鬼。 笑死空幻,一個(gè)胖子當(dāng)著我的面吹牛烁峭,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播秕铛,決...
    沈念sama閱讀 40,430評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼约郁,長吁一口氣:“原來是場噩夢啊……” “哼缩挑!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起棍现,我...
    開封第一講書人閱讀 39,342評論 0 276
  • 序言:老撾萬榮一對情侶失蹤调煎,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后己肮,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體士袄,經(jīng)...
    沈念sama閱讀 45,801評論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,976評論 3 337
  • 正文 我和宋清朗相戀三年谎僻,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了娄柳。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,115評論 1 351
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡艘绍,死狀恐怖赤拒,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情诱鞠,我是刑警寧澤挎挖,帶...
    沈念sama閱讀 35,804評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站航夺,受9級特大地震影響蕉朵,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜阳掐,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,458評論 3 331
  • 文/蒙蒙 一始衅、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧缭保,春花似錦汛闸、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,008評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至彻亲,卻和暖如春孕锄,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背苞尝。 一陣腳步聲響...
    開封第一講書人閱讀 33,135評論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留宦芦,地道東北人宙址。 一個(gè)月前我還...
    沈念sama閱讀 48,365評論 3 373
  • 正文 我出身青樓,卻偏偏與公主長得像调卑,于是被迫代替她去往敵國和親抡砂。 傳聞我的和親對象是個(gè)殘疾皇子大咱,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,055評論 2 355

推薦閱讀更多精彩內(nèi)容