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
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to elastic/elasticsearch-js by delvedor 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to elastic/elasticsearch-js by delvedor 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to elastic/elasticsearch-js by delvedor 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to elastic/elasticsearch-js by delvedor 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to superdev728/elasticsearch-js by superdev728 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to ZeusMystery/elasticsearch by ZeusMystery 5 years ago
- Feat: Support bundlers (#783) With this change, we support code bundlers, such as webpack. Fixes: https://github.com/elastic/elasticsearch-js/issues/781 — committed to ZeusMystery/elasticsearch by ZeusMystery 5 years ago
@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"
.