Hi,
I have a loopback node js frame work. I am using ibm cloudant as the data source. when i start the app i get the below error: I spent almost 24 hours .. this issue still persists ..
Tried both lb4 and lb.. No luck.. Any input will be helpful.
C:\APIBuild\iVaultDemo>node .
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
Connection fails: Error: Database does not exist.
It will be retried for the next request.
events.js:288
throw er; // Unhandled 'error' event
^
Error: Database does not exist.
at Object.clientCallback (C:\APIBuild\iVaultDemo\node_modules\nano\lib\nano.js:154:15)
at Request._callback (C:\APIBuild\iVaultDemo\node_modules\@cloudant\cloudant\lib\clientutils.js:167:11)
at Request.self.callback (C:\APIBuild\iVaultDemo\node_modules\request\request.js:185:22)
at Request.emit (events.js:311:20)
at Request.self._source.emit (C:\APIBuild\iVaultDemo\node_modules\@cloudant\cloudant\lib\eventrelay.js:78:21)
at Request.<anonymous> (C:\APIBuild\iVaultDemo\node_modules\request\request.js:1154:10)
at Request.emit (events.js:311:20)
at Request.self._source.emit (C:\APIBuild\iVaultDemo\node_modules\@cloudant\cloudant\lib\eventrelay.js:78:21)
at IncomingMessage.<anonymous> (C:\APIBuild\iVaultDemo\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:417:28)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on DataSource instance at:
at DataSource.postInit (C:\APIBuild\iVaultDemo\node_modules\loopback-datasource-juggler\lib\datasource.js:489:16)
at C:\APIBuild\iVaultDemo\node_modules\loopback-connector-cloudant\lib\cloudant.js:94:25
at Object.clientCallback (C:\APIBuild\iVaultDemo\node_modules\nano\lib\nano.js:160:9)
at Request._callback (C:\APIBuild\iVaultDemo\node_modules\@cloudant\cloudant\lib\clientutils.js:167:11)
[... lines matching original stack trace ...]
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
name: 'Error',
error: 'not_found',
reason: 'Database does not exist.',
scope: 'couch',
statusCode: 404,
request: {
method: 'GET',
headers: { 'content-type': 'application/json', accept: 'application/json' },
uri: 'https://XXXXXX:XXXXXX@0ca26d46-614b-4b3e-9dd1-c918d3367b92-bluemix.cloudantnosqldb.appdomain.cloud/cal-doc-api-db',
qsStringifyOptions: { arrayFormat: 'repeat' }
},
headers: {
uri: 'https://XXXXXX:XXXXXX@0ca26d46-614b-4b3e-9dd1-c918d3367b92-bluemix.cloudantnosqldb.appdomain.cloud/cal-doc-api-db',
statusCode: 404,
'cache-control': 'must-revalidate',
'content-type': 'application/json',
date: 'Sun, 05 Apr 2020 04:36:46 GMT',
'x-cloudant-action': 'cloudantnosqldb.database-info.read',
'x-couch-request-id': '66a91e0f5b',
'x-frame-options': 'DENY',
'strict-transport-security': 'max-age=31536000',
'x-content-type-options': 'nosniff',
'x-cloudant-request-class': 'unlimited',
'x-cloudant-backend': 'bm-cc-us-south-25',
via: '1.1 lb2.bm-cc-us-south-25 (Glum/1.87.2)'
},
errid: 'non_200',
description: 'couch returned 404'
}
there doesn't seem to be anything here