Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

nano.db is undefined #66

Open
ayatokura opened this issue Aug 13, 2019 · 1 comment
Open

nano.db is undefined #66

ayatokura opened this issue Aug 13, 2019 · 1 comment

Comments

@ayatokura
Copy link

When I run "yarn start", I've got the following error.
yarn run v1.15.2

credentials.iam_apikey: xxx
credentials.iam_username: xxx
/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/node_modules/@cloudant/cloudant/cloudant.js:164
  nano.use = nano.db.use = use;
                         ^
TypeError: Cannot set property 'use' of undefined
    at new Cloudant (/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/node_modules/@cloudant/cloudant/cloudant.js:164:26)
    at getCloudantService (/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/src/bluemix/config.js:50:20)
    at Object.<anonymous> (/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/src/models/access.js:22:18)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at loader (/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/ayatokura/ibmdojo/dxchallenge/watson-discovery-news-alerting/app/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
error Command failed with exit code 1.
@rhagarty
Copy link
Member

@ayatokura this code pattern hasn't been updated in a while, and I'm sure the issue has to do with old API's accessing newly created Watson services. If you are interested in learning how to use Watson Discovery, I would suggest taking a look at any of the code patterns linked to here - https://developer.ibm.com/series/learning-path-watson-discovery/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants