0

我正在尝试在 WSL(Ubuntu)中运行 Ganache。当我克隆 git 存储库,npm install然后运行npm start时,我得到了这个未指定的错误。

> ganache@2.0.0-beta.1 start /mnt/c/Users/Name/Documents/ethereum_projects/Ganache/ganache
> electron-forge start

✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 15 / 15
✔ Launching Application
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ganache@2.0.0-beta.1 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ganache@2.0.0-beta.1 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/name/.npm/_logs/2018-12-25T22_53_48_231Z-debug.log

在日志文件中没有什么更具体的了。就这个:

10 silly lifecycle ganache@2.0.0-beta.1~start: Args: [ '-c', 'electron-forge start' ]
11 silly lifecycle ganache@2.0.0-beta.1~start: Returned: code: 1  signal: null
12 info lifecycle ganache@2.0.0-beta.1~start: Failed to exec start script
13 verbose stack Error: ganache@2.0.0-beta.1 start: `electron-forge start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid ganache@2.0.0-beta.1
15 verbose cwd /mnt/c/Users/Name/Documents/ethereum_projects/Ganache/ganache
16 verbose Linux 4.4.0-17763-Microsoft
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v10.14.2
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error ganache@2.0.0-beta.1 start: `electron-forge start`
22 error Exit status 1
23 error Failed at the ganache@2.0.0-beta.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

这是我的 package.json:

{
  "name": "ganache",
  "productName": "Ganache",
  "version": "2.0.0-beta.1",
  "description": "Personal Blockchain for Ethereum",
  "main": "./src/init.js",
  "private": true,
  "scripts": {
    "start": "electron-forge start",
    "lint": "echo \"No linting configured\"",
    "sign-mac": "codesign --deep --force --verbose --sign 'Developer ID Application: Timothy Coulter (58RKXWC272)' ./dist/*.dmg",
    "makeappxassets": "svg2uwptiles -i ./Logo.svg -c ./blank.svg -o ./resources/appx/",
    "build-linux": "cd ./node_modules/rabin-bindings && node-gyp rebuild && cd ../../ && electron-builder --linux",
    "build-mac": "electron-builder --mac",
    "build-windows": "electron-builder --win",
    "test": "npm run test-mocha",
    "test-mocha": "mocha --compilers js:babel-register --check-leaks --globals _scratch,sanitizedData 'test/mocha/**/*.test.js'"
  },
  "browserslist": "chrome 50",
  "build": {
    "appId": "org.trufflesuite.ganache",
    "files": [
      "src/**/*",
      "node_modules/**/*",
      "resources/fonts/*",
      "resources/icons/**/*",
      "package.json"
    ],
    "directories": {
      "buildResources": "resources",
      "output": "dist"
    },
    "win": {
      "icon": "resources/icons/win/icon.ico",
      "certificateFile": "./certs/cert.pfx",
      "target": [
        {
          "target": "nsis",
          "arch": [
            "x64"
          ]
        },
        {
          "target": "appx",
          "arch": [
            "x64"
          ]
        }
      ]
    },
    "appx": {
      "identityName": "Ganache",
      "publisher": "CN=Consensys Inc, O=Consensys Inc, L=New York, S=New York, C=US",
      "publisherDisplayName": "Consensys Inc",
      "backgroundColor": "#34262A"
    },
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": "true",
      "deleteAppDataOnUninstall": "true",
      "artifactName": "Ganache-${version}-setup.${ext}"
    },
    "mac": {
      "icon": "resources/icons/icon.icns",
      "identity": "Timothy Coulter (58RKXWC272)"
    },
    "dmg": {
      "background": "resources/dmg/background.tiff",
      "contents": [
        {
          "x": 219,
          "y": 358,
          "type": "dir",
          "name": "Ganache.app"
        },
        {
          "x": 439,
          "y": 358,
          "type": "link",
          "name": "Applications",
          "path": "/Applications"
        }
      ],
      "icon": "resources/icons/icon.icns",
      "format": "ULFO"
    },
    "linux": {
      "target": [
        {
          "target": "AppImage",
          "arch": [
            "x64"
          ]
        }
      ],
      "icon": "resources/icons/png/",
      "category": "Development",
      "executableName": "Ganache",
      "artifactName": "Ganache-${version}.${ext}"
    }
  },
  "config": {
    "forge": {
      "electronPackagerConfig": {
        "icon": "resources/icons/win/icon.ico",
        "prune": true,
        "ignore": [
          ".*node_modules/fsevents/build.*",
          "forge_hooks",
          ".vscode"
        ],
        "afterPrune": [
          "./forge_hooks/afterPrune.js"
        ]
      }
    }
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/trufflesuite/ganache.git"
  },
  "author": {
    "name": "Truffle",
    "email": "inquiry@trufflesuite.com",
    "url": "https://github.com/trufflesuite"
  },
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/trufflesuite/ganache/issues"
  },
  "keywords": [
    "ganache",
    "ethereum",
    "blockchain",
    "truffle"
  ],
  "homepage": "https://github.com/trufflesuite/ganache#readme",
  "devDependencies": {
    "asar": "^0.13.0",
    "babel-core": "^6.21.0",
    "babel-eslint": "^7.1.1",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-dev-expression": "^0.2.1",
    "babel-plugin-inline-react-svg": "^0.5.2",
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-plugin-transform-class-properties": "^6.19.0",
    "babel-plugin-transform-es2015-classes": "^6.18.0",
    "babel-polyfill": "^6.20.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-react-optimize": "^1.0.1",
    "babel-preset-stage-0": "^6.16.0",
    "chai": "^3.5.0",
    "concurrently": "^3.1.0",
    "cross-env": "^3.1.4",
    "electron-builder": "20.31.2",
    "electron-compilers": "^5.9.0",
    "electron-debug": "^1.1.0",
    "electron-devtools-installer": "^2.0.1",
    "electron-forge": "^5.1.1",
    "electron-icon-maker": "0.0.3",
    "electron-log": "^2.2.9",
    "electron-prebuilt-compile": "1.8.4",
    "jsdom": "^9.9.1",
    "minimist": "^1.2.0",
    "mocha": "^3.5.3",
    "node-sass": "^4.5.3",
    "prop-types": "^15.5.10",
    "rcedit": "^0.9.0",
    "redux-logger": "^2.7.4",
    "source-map-support": "^0.4.8",
    "svg2uwptiles": "0.0.4",
    "temp": "^0.8.3",
    "webpack": "^3.11.0"
  },
  "dependencies": {
    "@exponent/electron-cookies": "^2.0.0",
    "@seesemichaelj/react-json-view": "^1.20.2",
    "async": "^2.5.0",
    "benjamincburns-forked-electron-updater": "2.21.6",
    "builder-util-runtime": "^4.2.0",
    "electron-compile": "^6.4.2",
    "electron-settings": "^3.1.2",
    "electron-squirrel-startup": "^1.0.0",
    "ethagen": "0.0.2",
    "ethereumjs-units": "^0.2.0",
    "filesize": "^3.6.1",
    "find-process": "^1.1.0",
    "fs-extra": "^7.0.0",
    "ganache-core": "2.3.2",
    "keccak": "^1.4.0",
    "lodash.clonedeep": "^4.5.0",
    "lodash.isequal": "^4.5.0",
    "lodash.merge": "^4.6.1",
    "lodash.omit": "^4.5.0",
    "lodash.padstart": "^4.6.1",
    "moment": "^2.17.1",
    "moment-timezone": "^0.5.11",
    "moniker": "^0.1.2",
    "mousetrap": "^1.6.1",
    "node-localstorage": "^1.3.1",
    "pidusage": "^1.1.5",
    "pluralize": "^5.0.0",
    "rabin-bindings": "^1.7.4",
    "react": "^16.3.2",
    "react-custom-scrollbars": "^4.2.1",
    "react-dom": "^16.3.2",
    "react-hot-loader": "^3.1.1",
    "react-marked-markdown": "^1.4.6",
    "react-md-spinner": "^0.3.0",
    "react-moment": "^0.2.2",
    "react-redux": "^5.0.2",
    "react-render-html": "^0.6.0",
    "react-router": "^3.0.1",
    "react-router-redux": "^4.0.7",
    "redux": "^3.6.0",
    "redux-thunk": "^2.2.0",
    "reselect": "^2.5.4",
    "rlp": "^2.1.0",
    "scrypt": "^6.0.3",
    "truffle-config": "^1.1.0-next.1",
    "truffle-decoder": "^1.0.1-beta.0",
    "universal-analytics": "^0.4.13",
    "uuid": "^3.1.0",
    "web3": "1.0.0-beta.35"
  },
  "optionalDependencies": {
    "7zip-bin-win": "^2.2.0",
    "dmg-builder": "^5.3.0"
  },
  "devEngines": {
    "node": ">=6.x",
    "npm": ">=3.x"
  }
}

fdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfafdfsfasdfa fdfsfasdfa

4

1 回答 1

0

我克隆了Ganache并按照Readme.md文件上的所有说明进行操作,对我来说一切都很好。我在用:

  • 节点:v9.11.1
  • npm:6.4.1

我建议您删除您的node_modules,然后您应该仔细阅读说明并确保您遵循他们的基本要求:

  • npm v5.3.0
  • 节点 v8.3.0

之后,您可以继续执行以下操作:

npm install
npm start

注意:确保运行时所有依赖项都已成功安装npm install

于 2018-12-30T04:47:44.803 回答