Requirement of unknown module "buffer" in the reaction-native-route-flow

I import reaction-native-route-flux and tried to run the application in genny motion emulator. I got such an error even in the basic example of the application that we create after reacting to our own init.

Unknown module "buffer" required

import { Router, Scene } from 'react-native-router-flux';

This is what I have in package.json

  { "name": "HelloFlux", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start" }, "dependencies": { "react": "^15.0.2", "react-native": "^0.26.0", "react-native-router-flux": "^3.22.23" } } 

The other day it worked fine.

+1
source share
1 answer

According to this , there are dependency issues with assert lib.

The best solution to fix is ​​to force an older version of the broken dep:

 npm install --save assert@1.3.0 

Another solution that worked for me (sorta) is to install from github:

 npm install --save aksonov/react-native-router-flux 
+1
source

All Articles