ignite icon indicating copy to clipboard operation
ignite copied to clipboard

[Maverick] Reactotron unable to resolve react

Open HamoBoker opened this issue 4 years ago • 8 comments

Describe the bug

Error

BUNDLE  ./index.js 

error: Error: Unable to resolve module react from /Users/hamoboker/Projects/Senora/PizzaApp/node_modules/reactotron-react-native/dist/index.js: 

None of these files exist:
  * node_modules/reactotron-react-native/node_modules/react(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  * node_modules/reactotron-react-native/node_modules/react/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)

Reproduce

ignite new PizzaApp
cd PizzaApp
npm run android/ios

Ignite version

8.0.0

Additional info

System
  platform           darwin                                                 
  arch               arm64                                                  
  cpu                8 cores      Apple M1                                  
  directory          PizzaApp     /Users/hamoboker/Projects/Senora/PizzaApp 

JavaScript (and globally-installed packages)
  node                  16.17.1                                   /Users/hamoboker/.nvm/versions/node/v16.17.1/bin/node 
  npm                   8.19.2                                    /Users/hamoboker/.nvm/versions/node/v16.17.1/bin/npm  
    @angular/cli        10.2.1                                                                                          
    corepack            0.10.0                                                                                          
    ignite-cli          8.0.0                                                                                           
    nodemon             2.0.20                                                                                          
    npm-check-updates   16.3.2                                                                                          
    npm                 8.19.2                                                                                          
    pm2                 5.2.0                                                                                           
    prettier            2.7.1                                                                                           
    react-devtools      4.26.0                                                                                          
    serverless          3.17.0                                                                                          
    ts-node             10.9.1                                                                                          
    typescript          4.8.3                                                                                           
  yarn                  1.22.15                                   /Users/hamoboker/.nvm/versions/node/v16.17.1/bin/yarn 
  pnpm                  6.11.0                                    /Users/hamoboker/.nvm/versions/node/v16.17.1/bin/pnpm 
                        <no pnpm global package info available>                                                         
  expo                  46.0.13                                   managed                                               

Ignite
  ignite-cli         8.0.0        /Users/hamoboker/.nvm/versions/node/v16.17.1/bin/ignite                        
  ignite src         build        /Users/hamoboker/.nvm/versions/node/v16.17.1/lib/node_modules/ignite-cli/build 

Android
  java               15.0.2       /usr/bin/java                        
  android home       -            /Users/hamoboker/Library/Android/sdk 

iOS
  xcode              14.0       
  cocoapods          1.11.3       /opt/homebrew/bin/pod 

Tools
  git                git version 2.37.3   /opt/homebrew/bin/git 

HamoBoker avatar Sep 27 '22 02:09 HamoBoker

Same here

Scr3nt avatar Sep 27 '22 06:09 Scr3nt

Same bug here, with v8.0.0 from the boilerplate

AshwinDeTaeye avatar Sep 27 '22 06:09 AshwinDeTaeye

same here..

note: Not sure if this is signficant but it seems this error does not occur when I have yarn installed and ignite-cli uses that as the package manager and I subsequently use yarn start, yarn ios to launch.

npx ignite-cli@next new PizzaApp cd PizzaApp npm start npm run ios

System platform darwin arch arm64 cpu 8 cores Apple M1 directory PizzaApp /Users/carrollfulkerson/code/PizzaApp

JavaScript (and globally-installed packages) node 16.17.0 /Users/carrollfulkerson/.nvm/versions/node/v16.17.0/bin/node npm 8.15.0 /Users/carrollfulkerson/.nvm/versions/node/v16.17.0/bin/npm corepack 0.12.1 npm 8.15.0 yarn - not installed pnpm - not installed expo 46.0.13 managed

Ignite ignite-cli 8.0.0 /Users/carrollfulkerson/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite ignite src build /Users/carrollfulkerson/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android java 11.0.16.1 /usr/bin/java android home - undefined

iOS xcode 14.0 cocoapods 1.11.3 /opt/homebrew/bin/pod

Tools git git version 2.37.3 /opt/homebrew/bin/git

sondogF123 avatar Sep 27 '22 14:09 sondogF123

Same here with v8.0.0-beta.8 after I ran npx expo-cli doctor --fix-dependencies

equationalapplications avatar Sep 27 '22 23:09 equationalapplications

Run npm i --legacy-peer-deps in the project folder.

danihorvath avatar Sep 29 '22 09:09 danihorvath

npm I --legacy-peer-deps appears to have cleared the issue for me. thank you @hodani

sondogF123 avatar Sep 29 '22 13:09 sondogF123

Hey everyone. I've been exploring this one. It was caused by a change in the reactotron-react-native library. I have a PR open over there that should fix it.

carlinisaacson avatar Sep 29 '22 20:09 carlinisaacson

#2236 will fix this for new ignite apps. For already ignited apps you can update reactotron-react-native to 5.0.3.

carlinisaacson avatar Sep 29 '22 23:09 carlinisaacson