Suggestion: Better error message when unable to resolve modules
See original GitHub issueRelated 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:
- Created 7 years ago
- Reactions:6
- Comments:9 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.