[Dapp] npm install truffle-hdwallet-provider 在Windows 除錯方法

在Linux 用的好好的 npm install truffle-hdwallet-provider 或是   npm install zeppelin-solidity

因為合作的關係在千百個不願意還是換到了windows,在Windows 卻發生很多問題 : 以下是確認步驟:

1.記得要先設定git的環境變數

ex: C:\Program Files\Git\cmd



2.發現錯誤
npm ERR! git fetch -a origin (https://github.com/debris/bignumber.js.git) fatal: unable to access 'https://github.com/debris/bignumber.js.git/': Couldn't connect to server
此時先去更新git的版本

3.發現錯物

gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

此時要更新 node-gyp 

npm install -g node-gyp@latest

4. 發現錯誤 
Can't find Python executable "python", you can set the PYTHON env varia
ble.


此時要去安裝python ,但是自己安裝除除非很懂python ,不然這裡推薦一個方法

用管理員身分 執行 利用windows的 powershell 去執行以下這段command
npm install --global --production windows-build-tools

所有插件一次安裝到好
















留言

這個網誌中的熱門文章

angular 如何Http 如何設定 CORS (Cross-Origin Resource Sharing)

Google Map 單車路徑計算坡度和角度小工具

Google URL Shortener API 快速教學