T
T
tgkd2015-07-15 15:26:26
JavaScript
tgkd, 2015-07-15 15:26:26

Why is the node js module not working?

I want to use the module for DynamoDB. I install it via npm.
I indicate var ddb = require('dynamodb');.
...
ddb.getItem(...)
An error is displayed in the console Is the
c8ef42ac9b0b455ba1d21bd190ef3051.PNG
code trying to use undefined as a function?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nagibator8000, 2015-07-15
@nagibator8000

"undefined is not a function" doesn't tell you anything? It turns out that the ddb variable is not defined. Maybe it just doesn't find the module. Try to reinstall it.

S
Sergey Sergey, 2015-07-16
@hahenty

var ddb = require('ddb').ddb;
After initialization, there should be an object, not a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question