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.

"Required module not found" with Flow

See original GitHub issue

I’m experimenting with Flow, but I’m getting errors when importing react-redux:

/Users/<...>/foo.js:4:33,45: react-redux
Required module not found

I’ve made the error go away by adding this to .flowconfig:

[options]
module.name_mapper='\(react-redux\)' -> '\1/lib/index'

This might by caused by facebook/flow#654. Maybe the error will go away when that issue is fixed. In the meantime, is there anything that could be done in react-redux to avoid the above work-around?

Issue Analytics

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

github_iconTop GitHub Comments

13reactions
hipertrackercommented, Apr 16, 2017
6reactions
averyverycommented, Dec 1, 2016

@ericmasiello sure:

// flow/GeneralStub.js.flow
export default {};

// .flowconfig
module.name_mapper='\(react-redux\)' -> '<PROJECT_ROOT>/flow/GeneralStub.js.flow'
module.name_mapper='\(immutable\)' -> '<PROJECT_ROOT>/flow/GeneralStub.js.flow'
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve the required module not found error in flow.js
Create a folder named flow-typed at the root of the project. 1.2 Create the definition file. Create a file which has the same...
Read more >
How to use declarations to avoid "required module not found ...
And so I'm getting errors about certain imported modules not being found. I'm tackling the invariant package first. But, from the Flow ......
Read more >
"Required module not found" for module that exists in ...
This is happening because the library doesn't exist in flow-typed. A simple fix could be creating ...
Read more >
When I run my flow, I see an error: Failed to load and execute ...
The ModuleNotFoundError error usually happens when you register the flow from your development machine, and then you try to run the flow on...
Read more >
Flow modules for reusable functions - Amazon Connect
Flow modules are reusable sections of a flow. You can create them to extract repeatable logic across your flows, and create common functions....
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