Bitcoin-com / rest.bitcoin.com

Bitcoin.com's Cloud's REST API
https://rest.bitcoin.com
MIT License
19 stars 26 forks source link

npm start fail in master #574

Closed SuperCipher closed 4 years ago

SuperCipher commented 4 years ago

command PORT=3000 BITCOINCOM_BASEURL=http://localhost:3000/api/ RPC_BASEURL=http://localhost:18332/ RPC_PASSWORD=regtest RPC_USERNAME=regtest ZEROMQ_PORT=0 ZEROMQ_URL=0 NETWORK=local npm start

node -v : v8.11.4

> rest.bitcoin.com@3.12.4 start /Users/naach/dev/rest.bitcoin.com
> npm run build && node ./dist/app.js

> rest.bitcoin.com@3.12.4 build /Users/naach/dev/rest.bitcoin.com
> node ./node_modules/gulp/bin/gulp.js build && ./node_modules/typescript/bin/tsc

[22:00:38] Using gulpfile ~/dev/rest.bitcoin.com/gulpfile.js
[22:00:38] Starting 'build'...
[22:00:38] Finished 'build' after 47 ms
src/routes/v2/address.ts:113:18 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

113       ? parseInt(req.query.page, 10)
                     ~~~~~~~~~~~~~~

src/routes/v2/address.ts:765:18 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

765       ? parseInt(req.query.page, 10)
                     ~~~~~~~~~~~~~~

src/routes/v2/address.ts:844:11 - error TS2322: Type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to type 'string'.
  Type 'string[]' is not assignable to type 'string'.

844     const hdPath: string = req.query.hdPath ? req.query.hdPath : "0"
              ~~~~~~

src/routes/v2/mining.ts:90:47 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

90     if (req.query.nblocks) nblocks = parseInt(req.query.nblocks)
                                                 ~~~~~~~~~~~~~~~~~

src/routes/v2/mining.ts:91:45 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

91     if (req.query.height) height = parseInt(req.query.height)
                                               ~~~~~~~~~~~~~~~~

src/routes/v2/slp.ts:2349:18 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

2349       ? parseInt(req.query.fromBlock, 10)
                      ~~~~~~~~~~~~~~~~~~~

src/routes/v3/address.ts:113:18 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

113       ? parseInt(req.query.page, 10)
                     ~~~~~~~~~~~~~~

src/routes/v3/address.ts:765:18 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

765       ? parseInt(req.query.page, 10)
                     ~~~~~~~~~~~~~~

src/routes/v3/address.ts:844:11 - error TS2322: Type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to type 'string'.
  Type 'string[]' is not assignable to type 'string'.

844     const hdPath: string = req.query.hdPath ? req.query.hdPath : "0"
              ~~~~~~

src/routes/v3/mining.ts:90:47 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

90     if (req.query.nblocks) nblocks = parseInt(req.query.nblocks)
                                                 ~~~~~~~~~~~~~~~~~

src/routes/v3/mining.ts:91:45 - error TS2345: Argument of type 'string | string[] | ParsedQs | ParsedQs[]' is not assignable to parameter of type 'string'.
  Type 'string[]' is not assignable to type 'string'.

91     if (req.query.height) height = parseInt(req.query.height)
                                               ~~~~~~~~~~~~~~~~

Found 11 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! rest.bitcoin.com@3.12.4 build: `node ./node_modules/gulp/bin/gulp.js build && ./node_modules/typescript/bin/tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the rest.bitcoin.com@3.12.4 build 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!     /Users/naach/.npm/_logs/2020-07-12T15_01_05_036Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! rest.bitcoin.com@3.12.4 start: `npm run build && node ./dist/app.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the rest.bitcoin.com@3.12.4 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!     /Users/naach/.npm/_logs/2020-07-12T15_01_05_064Z-debug.log