I am trying to use the watson-developer-cloud module inside meteor methods and I keep getting
Uncaught Error: Cannot find module '/node_modules/watson-developer-cloud/services/alchemy_data_news/v1'
Even though the module is installed in my modules folder. Here is the code that calls the watson-developer-cloud
import { Meteor } from 'meteor/meteor';
import { ValidatedMethod } from 'meteor/mdg:validated-method';
import watson from 'watson-developer-cloud';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export const watsonSearch = new ValidatedMethod({
name: 'watsonNews',
validate: null,
run() {
const alchemy_data_news = watson.alchemy_data_news({
api_key:API_KEY
});
const params = {
start: 'now-1d',
end: 'now',
count: 5,
'q.enriched.url.title': 'chatbots',
'return': 'enriched.url.title,enriched.url.author,enriched.url.keywords'
};
alchemy_data_news.getNews(params, (err, news) => {
if (err) {
console.log('error:', err);
} else {
console.log(JSON.stringify(news, null, 2));
}
});
},
});