question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript/Node -> Error: Cannot find module

See original GitHub issue

💬 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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
daywisscommented, May 13, 2020

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".

0reactions
ankit-bhadja-sfcommented, Jun 28, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'typescript' Error in TS | bobbyhadz
To solve the cannot find module 'typescript' error, make sure to install typescript globally by running the npm i -g typescript command and...
Read more >
Fixing The "Cannot Find Module" Error In TypeScript
The first thing to fix the "cannot find module" error in TypeScript is to ensure that the package is installed on your system....
Read more >
TS cannot find modules - typescript - Stack Overflow
I have ran the generator with the following environment: typescript, react, webpack w/ NPM, gulp. When I run gulp serve I get the...
Read more >
Fix error: cannot find module 'x' in Node.js or 'express'
The “Cannot find module” error in Node.js occurs when NODE can not find a specific package your project depends on be it local...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
Why the "Error: cannot find module" Occurs · you're trying to import an item from a module you don't have installed in your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found