elasticsearch-js: TypeScript/Node -> Error: Cannot find module

💬 Is there any special configuration required for TypeScript, Node and WebPack?

I keep getting during runtime: { Error: Cannot find module './api/search.js'.......

Just trying to run an example code from: https://github.com/elastic/elasticsearch-js/blob/master/docs/examples/typescript.asciidoc

It looks like all the /api/* methods that are supposed to be lazy loaded are not in generated, by webpack, bundle.js.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

@katafractari were you able to fix issue for TS + Lambda? any help would be appreciated.

We are also seeing this error in production environment using @elastic/elasticsearch": "~7.6.1 and "typescript": "~3.6.2" being bundled with "fuse-box": "^3.7.1".