bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.81k stars 2.08k forks source link

How to install bitcore using npm? #3580

Closed zydjohnHotmail closed 1 year ago

zydjohnHotmail commented 1 year ago

Hello: I have tried to install bitcore on both Windows 10 (version 22H2) and Ubuntu 22.04, but both failed. For windows 10, the following is the output for installation: D:\nodejs\bitcore>npm install bitcore npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm ERR! code 1 npm ERR! path D:\nodejs\bitcore\node_modules\bitcore-node npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ./scripts/download npm ERR! '.' is not recognized as an internal or external command, npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\John\AppData\Local\npm-cache_logs\2023-04-17T19_36_16_007Z-debug-0.log

D:\nodejs\bitcore>node --version v18.14.2

D:\nodejs\bitcore>

For Ubuntu 22.04, there are so many issues. It will take some time to show you the issues.
Now, please advise on how to fix those issues on Windows 10 first. Thanks,

kajoseph commented 1 year ago

The bitcore package hasn't been updated in 6 years and is long out of date. It certainly won't work with Node 12+, you could try with Node 10.

What are you trying to do with it? If you're trying to run bitcore-node or bitcore-wallet-service, you should clone the repo with git clone https://github.com/bitpay/bitcore.git and then run those packages with npm run node or npm run bws. Otherwise, the crypto-wallet-core package might be what you actually want to use as a project dependency.

zydjohnHotmail commented 1 year ago

Hi, Please give me the URL for github crypto-wallet-core package, so I can take a look. Thanks,