Home > Software engineering >  React Native setup Mac M1 (Air)
React Native setup Mac M1 (Air)

Time:09-13

I follow this guy's tutorial https://youtu.be/MJEcookWYUI?t=686

I get errors after the command on the video

admin@MacBook-Air:~/Demo$ npm run ios
npm ERR! missing script: ios   
npm  ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2022-09-12T22_06_04_217Z-debug.log

I searched many websites , tried to do everything i saw but i nothing worked.

Please help

CodePudding user response:

check on your package.json script:

"android": "react-native run-android",
"ios": "react-native run-ios",

and try to running with npx react-native run-ios or yarn ios

CodePudding user response:

try this

"scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
  }

Add this to package.json file in case it isn't there. after adding run npx react-native run-ios

CodePudding user response:

Usually we can open project with xcode and run. It will automatically start metro server locally.

My suggestion open your project with xcode.

  • Related