-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow doesn't work with Lerna when importing packages into one another #5975
Comments
@rjdlee I think it would be helpful to state what version of Create React App you're using, since CRA is supporting Lerna only in their However, there's still a question if it works in the If you're using the |
@rista404 I'll update my CRA and let you know what happens. Thanks. |
For all the people subscribed, a PR to fix this has been opened at #6504 Please have a look (and maybe provide feedback) |
@steelbrain Looks like that PR isn't gonna be closed... Do you have any other ideas? |
I have this kind of configuration :
/packages/createReactApp/src/index.js
/.flowconfig
it's working fine. |
@flo-pereira do you have one |
only one |
I have a Lerna package containing two different React apps made with Create React App (let's called them App A and App B). One of the apps imports the other one. I want to add Flow support to both apps. To do so, I've installed Flow at the global level.
Flow functions correctly when each app is used separately. However, when I import one of the apps into the other, I get the following error in App B:
The way I interpret this is that Flow is not processing App A because it is a symlinked dependency (due to Lerna) inside App B. To resolve this, here is what I've tried:
module.name_mapper='^app-a$' -> '<PROJECT_ROOT>/../app-a/src/index.js'
whereindex.js
is the entry point for App A. This solution came from: How to apply flow type checking in lerna managed project? lerna/lerna#891../app-a/src/index.js
flow ls
inside App B and saw that bothapp-b
andapp-a
were part of the file list, but still got the same errorI copy and pasted this from my question on Stack Overflow: https://stackoverflow.com/questions/49090460/using-flow-with-lerna-and-create-react-app#
The text was updated successfully, but these errors were encountered: