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.

"Error: Cannot find module" output should include filename

See original GitHub issue

When using browserify and there’s a problem with the path to a module, I get error output like:

Error: Cannot find module 'module' from '/dir/subdir'

There may be any number of files in subdir that were trying to require the module. It would be really helpful for the error output to include the filename that contained the require() call instead of just the path to the dir it resides in.

Issue Analytics

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

github_iconTop GitHub Comments

jmmcommented, Feb 5, 2016
ljharbcommented, May 20, 2020

@A-312 that PR is merged on this repo, and released in v1.8.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
it seems like when i installed it globally the npm/node-modules folder was empty and i was trying to use ng new project-name it...
Read more >
"Cannot find module" when main file not index.js with ... - GitHub
I'm trying to run node with -experimental-specifier-resolution=node because TypeScript can't output .mjs files and I want to use extension-less ...
Read more >
Requiring modules in Node.js: Everything you need to know
Node modules have a one-to-one relation with files on the file-system. ... Error: Cannot find module 'find-me' at Function.Module._resolveFilename ...
Read more >
jest cannot find module relative path
[Solved]-Jest: cannot find module required inside module to be tested (relative ... ImportError: No module named path however, I have install path. exports ......
Read more >
TSConfig Reference - Docs on every TSConfig option
... include in the program. An error occurs if any of the files can't be found. ... Specifies an array of filenames or...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found