How to apply flow type checking in lerna managed project?
See original GitHub issueSince Lerna hoists common npm packages into root node_modules
folder, running flow
in each package cannot find these common npm packages in its own node_modules
folder. It would fail with error message as below.
5: import {createStore, applyMiddleware, combineReducers, compose} from 'redux';
^^^^^^^ redux. Required module not found
In above case, redux
is hoisted to node_modules
in root node_modules
.
Is there any practice to workaround for flow type-checking?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:24
- Comments:11 (5 by maintainers)
Top Results From Across the Web
@mikojs/lerna-flow-typed-install - npm package | Snyk
Run `flow-typed install` in the lerna-managed project. Visit Snyk Advisor to see a full health score report for @mikojs/lerna-flow-typed-install, including ...
Read more >How to deploy only changed packages in a Lerna Monorepo
Lerna offers a solution with a little “hack”: simply put package_2 in the devDependencies of package_1: Lerna will automatically detect packages ...
Read more >Lerna You a Monorepo: The Nuts and Bolts of Building a CI ...
Make sure unit testing, screenshot testing, interaction testing, ... We decided to use a single Percy project, and run partial builds on ...
Read more >1.1 Motivation · flow-mono-cli - Immowelt Group
As of now maintaining a mono-repository with flow is hard, there are a few issues within flow ... How to apply flow type...
Read more >Introducing Flow-Typed - JavaScript. Flow
The process of managing libdefs for a Flow project should be ... or make use of new Flow features that better describe the...
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 Free
Top 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
@sibelius Relying on third party solutions is not ideal. While I agree this particular issue is out of scope for Lerna itself, I still think it should be taken care of in flow instead of some third party wrapper or fork
@evocateur I checked @wtgtybhertgeghgtwtg 's repo and found the difference. In that repo, flow is run at root instead of each package. And, there is a
flow-typed
sub folder holding dependency package libdef.Surely, we can leverage same strategy to make flow work in lerna. But, it is preferred to enable each sub-package could run flow independently without much setup.