elementui源碼解讀-問題4 處理scss文件卡死,fibers缺失

1.npm run dev時,產生以下錯誤

12% building modules 18/25 modules 7 active ...e-style-loader\lib\addStylesClient.js## There is an issue with `node-fibers` ##
`D:\losedguest\MyDemo\Vue\workplace\node_modules\_fibers@5.0.0@fibers\bin\win32-x64-64\fibers.node` is missing.

Try running this to fix the issue: C:\Program Files\nodejs\node.exe D:\losedguest\MyDemo\Vue\workplace\node_modules\_fibers@5.0.0@fibers/build
Error: Cannot find module 'D:\losedguest\MyDemo\Vue\workplace\node_modules\_fibers@5.0.0@fibers\bin\win32-x64-64\fibers'

16% building modules 50/51 modules 1 active ...place\webui\packages\theme\index.scss

2.cnpm install fibers -D 產生以下錯誤

D:\losedguest\MyDemo\Vue\workplace\webui\node_modules\_fibers@5.0.0@fibers>node "C:\Program Files\nodejs\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild --release
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

參考 https://www.jianshu.com/p/0ddbfce334a5

需要裝

npm install --global node-gyp

npm install --global --production windows-build-tools

3.安裝production windows-build-tools時,卡死了

將信息向上翻  找到vs_BuildTools.exe的保存路徑,或者用Everything工具搜下,這個exe.直接打開 畫面上可能要求重啟windows

重啟完後在打開,看到以下畫面即OK,然後重新安裝production windows-build-tools

成功后的信息

--問題依然存在

npm run dev 依然失敗

fibers安裝不成功 找不到python

node-gyp configure 找不到node-gyp找不到binding.gyp

 

解決fibers安裝問題

1.安裝最新的webpack-dev-server,然後看下他的package.json里依賴的webpack,webpack-cli的版本 ,然後將它替換到自己項目里,然後把node_modules文件夾刪掉重新npm install

2.再重新安裝npm install fibers 就成功了

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值