bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

Missing server.js in branch v8.0.0

Open purplefox81 opened this issue 8 years ago • 5 comments

I am referring to this directory https://github.com/bitpay/bitcore/tree/v8.0.0/packages/bitcore-node

in bin/start script, it is invoking ../server.js, which expects a server.js in the root dir of bitcore-node

but there is no such file as i can see from branch v8.0.0, did I miss any steps? or can someone from bitpay/bitcore team put back the server.js file?

Thanks.

purplefox81 avatar Nov 29 '18 13:11 purplefox81

More background

Instead of npm install -g bitcore-node@beta (i tested this on another machine, it works), i clone the latest code and install bitcore-node as a local package

the steps are

  • git clone https://github.com/bitpay/bitcore.git
  • cd bitcore
  • git checkout v8.0.0
  • git branch
  • cd packages/bitcore-node
  • npm install

I do note there is a bitcore/packages/bitcore-node/src/server.ts, but how/who/when does this server.ts get compiled to server.js and get placed at bitcore-node root dir?

really appreciate some experts can help me out, thanks!

purplefox81 avatar Nov 29 '18 14:11 purplefox81

In v8, you should npm-install from the root of the repository, which will install all dependencies for all packages (see here).

Edit: then you can run bitcore-node by running npm start in its package directory. That will compile TypeScript to JS: https://github.com/5apps/bitcore/blob/v8.0.0/packages/bitcore-node/package.json#L20

raucao avatar Nov 29 '18 15:11 raucao

i have this dir structure: /opt/bitcore/packages/bitcore-node

i used to run npm install and npm start at packages/bitcore-node, it worked.

second look at your kind reply, seems that you are suggesting i run npm install at /opt/bitcore directory? does it install all dependencies for each and every package under 'packages' dir? just to double confirm~~ many thanks for your help and advice!!

purplefox81 avatar Dec 03 '18 04:12 purplefox81

does it install all dependencies for each and every package under 'packages' dir? just to double confirm

Yes, that's what it should do. But there could still be issues with it. v8 is beta after all.

raucao avatar Dec 03 '18 10:12 raucao

Thanks @skddc !! Now the overall concept is clearer to me. Thanks again.

from the experiment, v8 is proved to be much stable than v5. that is really a great news.

One thing is, the insight module seems not ready, the github comment remain as "WIP", may i know is there any prototype of insight that I can install on top of the working "api/BTC/..." endpoints to make explorers "live"?

i tried to find some tutorial on guiding me in this, but didn't manage to find much. any pointer on the insight for bitcore v8? many thanks.

purplefox81 avatar Dec 05 '18 02:12 purplefox81