http-aws-es icon indicating copy to clipboard operation
http-aws-es copied to clipboard

Missing dependency elasticsearch

Open fabio-paiva-sp opened this issue 8 years ago • 5 comments

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)

fabio-paiva-sp avatar Feb 07 '17 14:02 fabio-paiva-sp

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'

sethrubenstein avatar Mar 31 '17 15:03 sethrubenstein

npm install elasticsearch --save

fnfilho avatar Apr 18 '17 14:04 fnfilho

It may be good to add elasticsearch as a peer dependency.

haoliangyu avatar May 26 '17 02:05 haoliangyu

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.

noofny avatar May 30 '17 06:05 noofny

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"

micklove avatar May 31 '17 15:05 micklove