osagga / bitcore-node-cash

Extensible full node using Bitcore
https://bitcore.io/
Other
9 stars 2 forks source link

requirePath issue #12

Open ww8912188 opened 5 years ago

ww8912188 commented 5 years ago

Hi,

I npm install this repo and finally get below error, sorry for the below long list:

root@ubuntu:/opt/bitcore-node-cash# ./bin/bitcore-node start
[2018-11-02T06:22:25.295Z] info: Checked the current working directory for service: p2p
[2018-11-02T06:22:25.335Z] info: Checked the current working directory for service: db
[2018-11-02T06:22:25.345Z] info: Checked the current working directory for service: header
[2018-11-02T06:22:25.346Z] info: Checked the current working directory for service: block
[2018-11-02T06:22:25.350Z] info: Checked the current working directory for service: mempool
[2018-11-02T06:22:25.351Z] info: Checked the current working directory for service: address
[2018-11-02T06:22:25.353Z] info: Checked the built-in path: lib/services, for service: address
[2018-11-02T06:22:25.353Z] info: Checked the module's package.json for service: address
/opt/bitcore-node-cash/lib/scaffold/start.js:149
    throw new Error('Attempted to load the ' + service.name + ' service from: ' +
    ^

Error: Attempted to load the address service from: the requirePath in the services' config, then "/opt/bitcore-node-cash" then from: "/opt/bitcore-node-cash/lib/scaffold/../lib/services" finally from: "/opt/bitcore-node-cash/package.json" - bitcoreNode field. All paths failed to find valid nodeJS code.
    at loadModule (/opt/bitcore-node-cash/lib/scaffold/start.js:149:11)
    at Function.setupServices (/opt/bitcore-node-cash/lib/scaffold/start.js:188:7)
    at start (/opt/bitcore-node-cash/lib/scaffold/start.js:25:31)
    at Command.<anonymous> (/opt/bitcore-node-cash/lib/cli/main.js:66:7)
    at Command.listener (/opt/bitcore-node-cash/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/opt/bitcore-node-cash/node_modules/commander/index.js:654:12)
    at Command.parse (/opt/bitcore-node-cash/node_modules/commander/index.js:474:21)
    at Object.main (/opt/bitcore-node-cash/lib/cli/main.js:143:11)

Here is the version info:

node v8.12.0
npm v6.4.1
bitcoin abc v0.18.2.0-unk

My bitcore-node.json:

{
  "network": "testnet",
  "port": 3001,
  "datadir": "/home/bch_data2",
  "services": [
    "p2p",
    "db",
    "header",
    "block",
    "mempool",
    "address",
    "transaction",
    "timestamp",
    "fee",
    "insight-api",
    "insight-ui",
    "web"
  ],
  "servicesConfig": {
    "insight-api": {
      "cwdRequirePath": "insight-api",
      "routePrefix": "api",
      "disableRateLimiter": true,
      "enableCache": true
    },
    "insight-ui": {
      "cwdRequirePath": "insight-ui",
      "routePrefix": "",
      "apiPrefix": "api"
    },
    "p2p": {
      "peers": [
        { "ip": { "v4": "127.0.0.1" } }
      ],
      "rpc":{
          "host":"127.0.0.1",
          "port":8332,
          "pass":"local321",
          "protocol":"http",
          "user":"bch"
      }
    },
    "fee": {
      "rpc": {
        "user": "bch",
        "pass": "local321",
        "host": "127.0.0.1",
        "protocol": "http",
        "port": 8332
      }
    }
  }
}

My bitcoin.conf:

datadir=/home/bch_data
testnet=1
server=1
whitebind=127.0.0.1:8333
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubrawtxlock=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcport=8332
rpcuser=bch
rpcpassword=local321

Any clue for this issue?