Flow: Cannot resolve module for relative paths

Created on 2 Oct 2018  路  1Comment  路  Source: facebook/flow

Example in file at path has the below import:

src
   -abc
    -def
        ghi
           --hello.jsx
       words.js

(ghi folder and words.js are in the dir 'def')

```
In src/abc/def/ghi/hello.jsx:

import words from '../words';

--> Throws error "Cannot resolve module ../words

My .flowconfig

[ignore]
./node_modules/.
./build/.
./dist/.

[include]
./src/.
./test/.

[libs]
flow-typed

[lints]

[options]
all=true
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src
module.name_mapper='^/(.*)$' -> '/1'

[strict]

```

Please help how to resolve '../words',

Thanks in advance.

Most helpful comment

Why was this closed without any comment?

>All comments

Why was this closed without any comment?

Was this page helpful?
0 / 5 - 0 ratings