Missing dependency elasticsearch
Just following the tutorial I got this error
throw err;
^
Error: Cannot find module 'elasticsearch'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
Yea when trying to run webpack to bundle this up I'm getting an error ERROR in ./~/http-aws-es/connector.js Module not found: Error: Can't resolve 'elasticsearch/src/lib/utils'
npm install elasticsearch --save
It may be good to add elasticsearch as a peer dependency.
Has anyone found a fix for this? We are currently experiencing this problem when we run the Lambda in AWS, but it works fine locally. Versions we are using are;
"elasticsearch": "^13.0.1",
"http-aws-es": "^1.1.3",
This is killing the usability of this module entirely.
I had this issue, as I was 'inadvertently' ignoring **/package.json files (d'oh!), in my gulpfile.
Does your zipped file contain a ./node_modules/elasticsearch/package.json ?
(explains why my stuff was working locally too, as my IDE was finding the package.json locally)
FYI - I believe lambda defaults to index.js, if it doesn't find a package.json
In the elasticsearch/package.json, you have the following line
"main": "src/elasticsearch.js"