Reputation: 127
I'm using nodejs third party module in my project. I followed the document given in NPM site. But when i execute js script using node,its showing error node module not found.
lambda function for alexa skill
'use strict';
const Alexa = require("alexa-sdk");
var tab = require("tableau-api");
exports.handler = function(event, context, callback) {
const alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
const handlers = {
'LaunchRequest': function() {
this.emit('SayHello');
},
'HelloWorldIntent': function() {
this.emit('SayHello');
}
};
Error:
"errorMessage": "Cannot find module 'tableau-api'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:474:25)",
"Module.require (module.js:596:17)",
"require (internal/module.js:11:18)",
"Object.<anonymous> (/var/task/index.js:3:11)",
"Module._compile (module.js:652:30)",
"Object.Module._extensions..js (module.js:663:10)",
"Module.load (module.js:565:32)",
"tryModuleLoad (module.js:505:12)",
"Function.Module._load (module.js:497:3)"
Upvotes: 0
Views: 833
Reputation: 56
It could be that you have not installed the package.
Try npm install --save tableau-api
Upvotes: 2