Truffle
Ganache GUI 安裝錯誤
節點版本 v12.8.0,npm 版本 6.10.2
我按照以下步驟安裝了 ganache GUI,但出現錯誤
$mkdir ~/ganache $git clone https://github.com/trufflesuite/ganache.git $npm install $npm start
錯誤:
ganache@2.1.1-beta.0 start /home/nithin/ganache electron-forge start
✔ Checking your system ✔ Locating Application An unhandled rejection has occurred inside Forge: Could not determine Electron version. Make sure that 'npm install' (or 'yarn') has been run before invoking electron-forge. Error: Could not determine Electron version. Make sure that 'npm install' (or 'yarn') has been run before invoking electron-forge. at /usr/lib/node_modules/electron-forge/dist/util/rebuild.js:26:13 at Generator.next (<anonymous>) at Generator.tryCatcher (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23) at PromiseSpawn._promiseFulfilled (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:97:49) at /usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:201:15 at /usr/lib/node_modules/electron-forge/dist/util/rebuild.js:63:17 at /usr/lib/node_modules/electron-forge/dist/api/start.js:105:33 at Generator.next (<anonymous>) at Generator.tryCatcher (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/util.js:16:23) at PromiseSpawn._promiseFulfilled (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/generators.js:97:49) at Promise._settlePromise (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:579:26) at Promise._settlePromise0 (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/promise.js:699:18) at _drainQueueStep (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/usr/lib/node_modules/electron-forge/node_modules/bluebird/js/release/async.js:147:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ganache@2.1.1-beta.0 start: `electron-forge start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ganache@2.1.1-beta.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/nithin/.npm/_logs/2019-08-14T11_24_08_546
還有一種替代方法。您可以從以下連結下載 ganache
$https://github.com/trufflesuite/ganache/releases/download/v1.2.2/ganache-1.2.2-x86_64.AppImage
下載後在終端執行以下命令
$cd Downloads $sudo chmod a+x ganache-1.2.2-x86_64.AppImage
現在搜尋 ganache 並點兩下它,然後在彈出框中按是。Ganache GUI 將啟動
我猜它與節點 12.x 不兼容
我設法用節點 10.16.0 安裝它
我還必須安裝以下內容來解決一些錯誤消息:
sudo apt-get install libgconf-2-4 sudo apt install libcanberra-gtk-module libcanberra-gtk3-module