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.

Suggestion: Better error message when unable to resolve modules

See original GitHub issue

Related to our woes with #8189, if the compilation errors gave some better hinting when it was unable to resolve a module, we might not have taken so long to find the solution (and we wouldn’t have filed an issue!).

The idea would be that if there is a compilation error of cannot file module "whatever", to make some intelligent checks against the parameters the compilation is running under and suggest using --moduleResolution node if the user is not already doing so.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jayphelpscommented, Apr 19, 2016

Happy to PR "Cannot find module '{0}'. If you're trying to import from node_modules you probably want '--moduleResolution node'" if that’s deemed acceptable.

A more complex version that checks “would this work if they had indeed used moduleResolution=node” would be ideal, but looking at the source IMO it would be needless complex considering a generic description like above is prolly satisfactory.

0reactions
jayphelpscommented, Apr 21, 2016

@mhegazy wow totally missed that doc page. It doesn’t come up on the first page of google, so not sure what (if anything) you could do to help the docs have a better SEO rank. The SO question with a link would hopefully help, as you described. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve module · Issue #11498 · facebook/react-native
Solution - just a workaround... · Click "Reset content and settings..." in the simulator's drop down menu and confirm · Close the simulator...
Read more >
React-Native Error: Unable to resolve module - Stack Overflow
Out of what seems like nowhere, I'm getting Error: Unable to resolve module '../../realm' from '/src/my/source/file' .
Read more >
Failed to resolve module org.mule ... - MuleSoft Help Center
I am created project from RAML , I was able to generate flows. I am seeing this error. My pom.xml is set to....
Read more >
Unable to resolve "module" from "node_modules/esm/esm.js ...
Hi, I just upgraded to SDK 39 from SDK38, I tried to run my app in the iOS emulator and I get a...
Read more >
How to fix "The following module is missing from the file ...
Use the point-and-click, administrative interface provided by drupal.org contrib modules. Option #1 - Module Missing Message Fixer · Use Drush. For example, run ......
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