嗨,我试图用React Native做一些你好的世界。 我创建项目'react-native init'更改'.flowconfig'中的流版本。
跑流,它给了我153个错误 node_modules
文件夹就好
node_modules/react-native/Libraries
有没有人遇到同样的问题?
嗨,我试图用React Native做一些你好的世界。 我创建项目'react-native init'更改'.flowconfig'中的流版本。
跑流,它给了我153个错误 node_modules
文件夹就好
node_modules/react-native/Libraries
有没有人遇到同样的问题?
我遇到了同样的问题。您需要执行两个步骤:
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
<PROJECT_ROOT>/node_modules/.*
<PROJECT_ROOT>/libdefs.js
.*/__tests__/.*
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
./libdefs.js
declare module 'react-native' { declare var exports: any; }
declare module 'jest' { declare var exports: any; }
另外,声明所有模块流引发错误(例如 'mobx' - 我知道这可能有点令人沮丧,但必须要做到)
我遇到了同样的问题。您需要执行两个步骤:
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
<PROJECT_ROOT>/node_modules/.*
<PROJECT_ROOT>/libdefs.js
.*/__tests__/.*
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
./libdefs.js
declare module 'react-native' { declare var exports: any; }
declare module 'jest' { declare var exports: any; }
另外,声明所有模块流引发错误(例如 'mobx' - 我知道这可能有点令人沮丧,但必须要做到)
发现了这个 问题 建议更新flowconfig以使用 来自create-react-native-app的最新版本。似乎对我有用。