Flow-runtime runs on cached location of files even if they have been moved
- Dominant language
- JavaScript
- Stars
- 797
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
This is a:
- [x ] Bug Report
- [ ] Feature Request
- [ ] Question
- [ ] Other
Which concerns:
- [x ] flow-runtime
- [ ] babel-plugin-flow-runtime
- [ ] flow-runtime-validators
- [ ] flow-runtime-mobx
- [ ] flow-config-parser
- [ ] The documentation website
---
### What is the current behaviour?
If I move a folder from one directory to another, flow-runtime doesn't see the new location of the .js files in that folder. This causes flow-runtime to error out if any of these .js files have dependencies using relative paths. It seems to be looking at a cached version of the .js files in the original folder location.
Example:
Initial folder structure:
common/
--components/
----dropdown/
------index.js
------styles.css
apps/ (on same level as common)
Run flow: -> no errors
Run application with flow-runtime: -> no errors.
If I move the dropdown folder into apps, creating this new folder structure:
common/
--components/
apps/
----dropdown/
------index.js
------styles.css
Run flow: -> no errors
Run application with flow-runtime: -> Receive this error:
ERROR in Flow: Type Error
Error: common/components/dropdown/index.js:6
./styles.css. Required module not found
Found 1 error
webpack: Failed to compile.
My current workaround is to re-create the original folder structure with blank files. Eg. I'd create a new folder in common/components called 'dropdown', then create an 'index.js', leave it blank, then run flow and flow-runtime again. Flow-runtime sees that the file is blank and throws no errors. Then I can delete this folder afterwards. But this is sort of silly to have to do.
---
### What is the expected behaviour?
Flow-runtime should keep an up-to-date version of the project's folder structure
---
### Which package versions are you using?
0.14.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.