Finding types from external dependencies when using Yarn workspaces
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I'm running into an issue when using flow in a `yarn workspaces` enabled monorepo
After installing `polished` with `yarn workspace workspace-name add polished` I have a `dependencies.polished` entry in my `workspace-name`'s `package.json`, and a `polished`directory under the repository's root `node_modules` directory, as expected.
Having a file in the workspace directory with:
```js
import { rgba, } from 'polished';
```
Spits out:
```sh
import { rgba, } from 'polished';
^^^^^^^^^^ polished. Required module not found
```
It all works just fine when run Flow from the root directory, to which `node_modules` directory Yarn installs all the different workspaces' dependencies into.
I'd expect Flow to look for type definitions in `node_modules` directories up the tree, in line with how npm and Yarn work.
Flow version : `0.57.2`
node version: `8.4.0`
Yarn verson: `1.2.1`
Contributor guide
Assessment
This issue has not been assessed yet.