Flow: Flow can't find module

Created on 16 Apr 2016  路  5Comments  路  Source: facebook/flow

I tried to resolve module with Trouble Shooting. But it absolutely doesn't work.

./src/.flowconfig has option:

[include]
../node_modules/

I installed sequelize module and test flow:

2016-04-16 11 17 09

I saw the module is installed correctly. My environment was OSX El Cap latest.

Most helpful comment

@rmakarov94 I just added node_modules to ignore. It should place include. That was my mistake.

All 5 comments

I believe the issue here is that Flow is not able to find node modules above the "root" where the .flowconfig file is. Can you move your .flowconfig up one directory?

I moved my .flowconfig file up one directory.

[2016-04-17 11:09:51] Initializing Server (This might take some time)
[2016-04-17 11:09:51] executable=/usr/local/Cellar/flow/0.22.0/bin/flow
[2016-04-17 11:09:51] version=0.22.0
[2016-04-17 11:09:51] Parsing
/Users/maniax/GameRecommend/node_modules/ No such file or directory
[2016-04-17 11:09:51] Building package heap
[2016-04-17 11:09:51] Running local inference
[2016-04-17 11:09:52] Re-resolving directly dependent files
[2016-04-17 11:09:52] Calculating dependencies
[2016-04-17 11:09:52] Merging
[2016-04-17 11:09:52] Done
[2016-04-17 11:09:52] Server is READY
[2016-04-17 11:09:52] Took 0.546391 seconds to initialize.

I removed the relative path ../node_modules -> ./node_modules. Then it worked well, but not able to resolve node_modules.

[2016-04-17 11:10:57] Initializing Server (This might take some time)
[2016-04-17 11:10:57] executable=/usr/local/Cellar/flow/0.22.0/bin/flow
[2016-04-17 11:10:57] version=0.22.0
[2016-04-17 11:10:57] Parsing
[2016-04-17 11:10:57] Building package heap
[2016-04-17 11:10:57] Running local inference
[2016-04-17 11:10:57] Re-resolving directly dependent files
[2016-04-17 11:10:57] Calculating dependencies
[2016-04-17 11:10:57] Merging
[2016-04-17 11:10:57] Done
[2016-04-17 11:10:57] Server is READY
[2016-04-17 11:10:57] Took 0.594378 seconds to initialize.
[2016-04-17 11:10:57] Status: Error
  2: import Sequelize from 'sequelize';
                           ^^^^^^^^^^^ sequelize. Required module not found

sequelize module is installed correctly. I don't know what's wrong.

I think I found my fault.

@Beingbook so, what was it?

@rmakarov94 I just added node_modules to ignore. It should place include. That was my mistake.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Beingbook picture Beingbook  路  3Comments

damncabbage picture damncabbage  路  3Comments

marcelbeumer picture marcelbeumer  路  3Comments

ctrlplusb picture ctrlplusb  路  3Comments

pelotom picture pelotom  路  3Comments