Skip to content
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

Plugin flipper-plugin-redux-debugger failed to load Error: Cannot find module 'react' #67

Open
hossamnasser938 opened this issue Feb 16, 2023 · 16 comments

Comments

@hossamnasser938
Copy link

I'm trying to integrate redux-flipper plugin But I'm getting the following error:
Screen Shot 2023-02-16 at 3 19 45 PM

I installed the plugin on flipper desktop app. I also installed redux-flipper: ^2.0.2 and react-native-flipper: ^0.162.0 into the app. I added the plugin to middleware array:

const createDebugger = require("redux-flipper").default
middlewares.push(createDebugger())

Could you help please?

@plwai
Copy link
Collaborator

plwai commented Feb 19, 2023

May I know what is your flipper version?

@hossamnasser938
Copy link
Author

Sure Version 0.162.0 (50.0.0) @plwai

@afonso-tsx
Copy link

I have the same issue, running windows 11 flipper version 0.125

@plwai
Copy link
Collaborator

plwai commented Feb 21, 2023

Can you try a newer version?

@jvfalco1
Copy link

I'm having the same issue with this package.json

"react-native-flipper": "^0.162.0",
"redux-flipper": "^2.0.1",
"react-native": "0.67.5",
"react": "17.0.2",

@jk-gan
Copy link
Owner

jk-gan commented Feb 25, 2023

@hossamnasser938 @afonsopbarros @jvfalco1 is it possible to use the latest version of react-native-flipper and flipper desktop app and try again?

I tested on my machine with react-native-flipper 0.182.0 and flipper desktop app version 0.182.0, it works perfectly

"dependencies": {
    "@reduxjs/toolkit": "^1.9.3",
    "react": "18.1.0",
    "react-native": "0.70.6",
    "react-native-flipper": "^0.182.0",
    "react-redux": "^8.0.5",
    "redux-flipper": "^2.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^26.0.23",
    "@types/react": "^18.0.21",
    "@types/react-native": "^0.70.6",
    "@types/react-test-renderer": "^18.0.0",
    "@typescript-eslint/eslint-plugin": "^5.37.0",
    "@typescript-eslint/parser": "^5.37.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "0.72.3",
    "react-test-renderer": "18.1.0",
    "typescript": "^4.8.3"
  }

Screenshot 2023-02-25 at 1 59 42 PM

@jvfalco1
Copy link

@hossamnasser938 @afonsopbarros @jvfalco1 is it possible to use the latest version of react-native-flipper and flipper desktop app and try again?

I tested on my machine with react-native-flipper 0.182.0 and flipper desktop app version 0.182.0, it works perfectly

"dependencies": {
    "@reduxjs/toolkit": "^1.9.3",
    "react": "18.1.0",
    "react-native": "0.70.6",
    "react-native-flipper": "^0.182.0",
    "react-redux": "^8.0.5",
    "redux-flipper": "^2.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^26.0.23",
    "@types/react": "^18.0.21",
    "@types/react-native": "^0.70.6",
    "@types/react-test-renderer": "^18.0.0",
    "@typescript-eslint/eslint-plugin": "^5.37.0",
    "@typescript-eslint/parser": "^5.37.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "0.72.3",
    "react-test-renderer": "18.1.0",
    "typescript": "^4.8.3"
  }
Screenshot 2023-02-25 at 1 59 42 PM

I've been trying to use the lastest versions too. Unfortunately, when I use flipper 0.182.0, it works perfectly on Android, but, when I try to use on iOS I get an error you can check at this ggithub issue link.

@jk-gan
Copy link
Owner

jk-gan commented Feb 27, 2023

Just to be clear, are you using react-native-flipper v0.182.0 too?

@jvfalco1
Copy link

Just to be clear, are you using react-native-flipper v0.182.0 too?

Yes, Im.

"react-native-flipper": "^0.182.0",
"redux-flipper": "^2.0.2",

Flipper Client: 0.182.0.

Podfile use_flipper!({ 'Flipper' => '0.182.0' })

@jk-gan

@jk-gan
Copy link
Owner

jk-gan commented Feb 28, 2023

that's weird, the error occur when you using simulator or real iphone? or both?

@jvfalco1
Copy link

Both, simulator and real phone.

@jk-gan
Copy link
Owner

jk-gan commented Mar 6, 2023

@jvfalco1 I'm unable to reproduce the issue (at least on my machine), perhaps you can provide me a sample react-native project with that issue that I can take a look?

@HugoGresse
Copy link

Facing the same issue, I've updated:

  • package react-native-flipper (to 0.184.0)
  • cd ios && pod install
  • rebuild iOS app
  • desktop app to 0.184.0

And it works again

@jk-gan
Copy link
Owner

jk-gan commented Mar 14, 2023

so the latest version of react-native-flipper is working nicely?

@HugoGresse
Copy link

for me yes, using RN 0.70.6 though

@seb1080
Copy link

seb1080 commented May 28, 2024

Thanks, I upgrade from Flipper v0.164.0 to v0.182.0 and the problem was resolve. I tested with a iOS physical device.

Error message

Plugin 'Redux Debugger' failed to load: 'Cannot find module 'react'
Require stack: - /Users/sblaisfernandez/.flipper/installed-plugins/flipper-plugin-redux-debugger/2.0.2/dist/bundle.js -
 /Applications/Flipper.app/Contents/Resources/app.asar/index.html'.

Set up causing the error

macOS: 14.4.1 (23E224)
node -v v18.17.1
Flipper: 0.164.0

"react-native": "0.72.14",
"react": "18.2.0",
"redux-flipper": "1.4.2",
"react-native-flipper": "0.164.0",

solution

Upgrade from Flipper v0.164.0 to v0.182.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants