Rajan Twanabashu
Rajan Twanabashu

Reputation: 4726

Requiring unknown module "buffer" in react-native-route-flux

I import react-native-route-flux and tried to run the application in genny motion emulator I got this kind of error even in the basic sample app that we create after react native init.

Requiring unknown module "buffer"

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 was working fine.

Upvotes: 1

Views: 1262

Answers (1)

Josh.F
Josh.F

Reputation: 3806

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

Best solution for a fix, force an older version of the broken dep:

npm install --save [email protected]

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

npm install --save aksonov/react-native-router-flux

Upvotes: 1

Related Questions