New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot resolve module when running Flow on Windows #21311
Comments
with
The issue seems had been fixed. So I close this now. Sorry, the above didn't solve the issue. the error gone just because I put // @flow after imports. |
Sorry, the above didn't solve the issue. the error gone just because I put // @flow after imports. |
No other one using flow under windows or don't have any problem on this? |
I had the issue but I just added more ignores to the flowconfig |
0.57.4 is released now, but this issue is not solved yet. |
I have contact with core members, maybe an issue related to metro. |
@gengjiawen Thank you! |
@TheSavior Looks like a flow issue, can you find some people work on this ? $ flow check --flowconfig-name .flowconfig.android
Error --------------------------------------------------------------- IntegrationTests/AccessibilityManagerTest.js:16:39
Cannot resolve module `RCTDeviceEventEmitter`.
16| const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
^^^^^^^^^^^^^^^^^^^^^^^
Error -------------------------------------------------------------------------- IntegrationTests/AppEventsTest.js:18:28
Cannot resolve module `deepDiffer`.
18| const deepDiffer = require('deepDiffer'); |
I have reported to flow team too facebook/flow#7138. |
Update: fb look into this, hopefully we can fix this soon. |
I believe this should fix it: facebook/flow#7419 |
@jamesisaac Thank you for the information. It's not yet apply to release package yet. So I will just wait because I don't want to compile it by myself. |
@jamesisaac Looks like still not working, see windows build on this pr: #21401. |
@gengjiawen Unrelated error? Or am I looking in the wrong place? Here all I see is:
I.e. Flow is not even starting correctly on AppVeyor. Whereas this issue is about the "Cannot resolve module" error once Flow does run. Had a quick look at |
Is it because the flow server still has bug on windows ? System:
OS: Windows 8.1
CPU: (2) ia32 Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
Memory: 2.90 GB / 4.88 GB
Binaries:
Node: 10.15.1 - C:\Program Files (x86)\nodejs\node.EXE
Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files (x86)\nodejs\npm.CMD
SDKs:
Android SDK:
Android NDK: 17.2.4988734
Languages:
Bash: 4.4.19 - C:\Program Files\Git\usr\bin\bash.EXE
Go: 1.11 - C:\go\bin\go.EXE
Perl: 5.22.1 - C:\Perl\bin\perl.EXE
Python: 2.7.15 - /c/Python27/python
Ruby: 1.9.3 - C:\Ruby193\bin\ruby.EXE
Browsers:
Internet Explorer: 11.0.9600.19036 |
Also on my windows 10 it still failed with npm ERR! code ELIFECYCLE
npm ERR! errno 110
npm ERR! react-native@1000.0.0 flow-check-android: `flow check --flowconfig-name .flowconfig.android`
npm ERR! Exit status 110
npm ERR!
npm ERR! Failed at the react-native@1000.0.0 flow-check-android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. Flow seems pretty much unusable in windows. |
On my Win10 machine this works fine in Git Bash and PowerShell: $ git clone https://github.com/facebook/react-native
$ cd react-native
$ yarn install
$ yarn flow
# Flow check finishes, 2 errors about `unclear-type` (`any` usage).
# Prior to fix it would have come back with hundreds of "Cannot resolve module" errors.
$ yarn run flow-check-android
# Again, flow check finishes with 2 `unclear-type` errors. Try running |
with react-native@0.59.0-rc3 and flow-bin@0.93.0(not 0.92.0), this issue gone. |
Glad it works. But still need to do work on this repo since there is another issue on windows. I will close this issue for now. |
Environment
Run
react-native info
in your terminal and paste its contents here.react-native info
React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 2.09 GB / 7.91 GB
Binaries:
Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
Description
using flow not working and got error with "Cannot resolve module XXXXXX". but same action under macOS works well.
Reproducible Demo
react-native init testapp
cd testapp
yarn add flow-bin@0.78.0 --dev
yarn flow
under windows will get errors.
The text was updated successfully, but these errors were encountered: