Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Podfile.lock missing when initial react-native run-ios

$
0
0

I am setting up IOS dev for React Native (0.61) app which has the working android version. What I did was to copy src of components and package.json file after react native environment is setup by following online post (installed xcode command line tool 10.2). But launching run-ios failed:

$ react-native run-ioserror Could not find "Podfile.lock" at /Users/mine/Documents/code/js/emps_fe6/ios/Podfile.lock. Did you run "pod install" in iOS directory?error Could not find the following native modules: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNKeychain, BVLinearGradient, RNLocalize, RNReanimated, RNVectorIcons, react-native-video. Did you forget to run "pod install" ?info Found Xcode project "emps_fe6.xcodeproj"xcrun: error: unable to find utility "simctl", not a developer tool or in PATHerror Could not parse the simulator list output. Run CLI with --verbose flag for more details.Error: Command failed: xcrun simctl list --json devicesxcrun: error: unable to find utility "simctl", not a developer tool or in PATH    at checkExecSyncError (child_process.js:629:11)    at Object.execFileSync (child_process.js:647:13)    at runOnSimulator (/Usersamine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:130:54)    at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:100:12)    at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23)    at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)    at Command.emit (events.js:198:13)    at Command.parseArgs (/Users/amine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)    at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)    at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)

Here is the output of react native info:

$ react-native infoinfo Fetching system and libraries information...System:    OS: macOS High Sierra 10.13.6    CPU: (8) x64 Intel(R) Core(TM) i7-2675QM CPU @ 2.20GHz    Memory: 194.93 MB / 8.00 GB    Shell: 3.2.57 - /bin/bash  Binaries:    Node: 10.17.0 - /usr/local/bin/node    Yarn: 1.19.1 - /usr/local/bin/yarn    npm: 6.11.3 - /usr/local/bin/npm  IDEs:    Xcode: /undefined - /usr/bin/xcodebuild  npmPackages:    react: 16.11.0 => 16.11.0     react-native: 0.61.2 => 0.61.2   npmGlobalPackages:    react-native-cli: 2.0.1

Here is the package.json:

"dependencies": {"@react-native-community/async-storage": "^1.6.2","moment": "^2.24.0","react": "16.11.0","react-native": "0.61.2","react-native-cli": "^2.0.1","react-native-confirmation-code-field": "^4.1.0","react-native-device-info": "^4.0.1","react-native-elements": "^1.2.6","react-native-gesture-handler": "^1.4.1","react-native-gifted-chat": "^0.11.3","react-native-keychain": "^4.0.1","react-native-linear-gradient": "^2.5.6","react-native-localize": "^1.3.1","react-native-modal": "^11.4.0","react-native-modal-datetime-picker": "^7.6.0","react-native-reanimated": "^1.3.0","react-native-segmented-control-tab": "^3.4.1","react-native-vector-icons": "^6.6.0","react-native-video": "^5.0.2","react-navigation": "^4.0.10","react-navigation-stack": "^1.10.2","react-navigation-tabs": "^2.5.6","simctl": "^2.0.0","socket.io-client": "2.1.1","xcode": "^2.0.0"  },

In the error message, there mentioned quite a few modules which are missing. But those modules have been installed as it shows in the package.json. I am not sure about what the error message means. Also I installed the simctl but scrum simctl still can not find it. I am using VS Code as IDE.

UPDATE:

created an empty Podfile.lock under /ios, the error becomes when run-ios:

error Cannot read property 'SPEC CHECKSUMS' of undefined. Run CLI with --verbose flag for more details.TypeError: Cannot read property 'SPEC CHECKSUMS' of undefined    at getDependenciesFromPodfileLock (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link-pods/getDependenciesFromPodfileLock.js:63:58)    at warnAboutPodInstall (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link/warnAboutPodInstall.js:43:67)    at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:80:36)    at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23)    at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)    at Command.emit (events.js:198:13)    at Command.parseArgs (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)    at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)    at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)    at Object.run (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:184:11)

Viewing all articles
Browse latest Browse all 16750

Trending Articles