格式:【描述】 【截图】 【解决】 【参考】
ios
关键词:EMFILE
【描述】
ERROR Error watching file for changes: EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"Error watching file for changes:","filename":null}Error: Error watching file for changes: EMFILEat _errnoException (util.js:1041:11)at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)
【截图】
【解决】
升级最新MacOS系统后,需要重新安装一次brew install watchman
或者
需要安装watchman
git clone
cd watchman./autogen.sh./configuremakesudo make install【参考】
android
关键词:override
【描述】
Native module VectorIconsModule tried to override VectorIconsModule for module name RNVectorIconsModule. If this was your intention, set canOverrideExistingModule=true
【截图】
【解决】
找到MainApplication.java(android/app/src/main/java/com),里面有有重复的引用,把重复的部分删除就行了
import com.oblador.vectoricons.VectorIconsPackage;// 删除...public class MainApplication extends Application implements ReactApplication { ... new VectorIconsPackage(), // 删除}
【参考】
关键词:refs
【描述】
addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render
method, or you have multiple copies of React loaded (details:
【截图】
【解决】
this.refs.abcd // 如果在rander之外使用ref就会报错报错改成:myRefs = { abcd: null} {this.myRefs.abcd = abcd}}>this.myRefs.abcd