I created a sample ReactNative project using npx react-native “projectName” on M1 chip based Mac. Project created without any issue and android project build and ran successfully without any error on both google preview emulator and real device. However iOS build gets fail. I have installed cocoa pods using Rosetta and and installed other required packages and softwares such as home-brew, watchman, Xcode, iOS emulator..etc
But if I create an expo project it works fine without any issue on both iOS and android, However I want to know, ReactNative CLI based projects works fine on M1 chipset, If it does work then, then something might be wrong with the my development setup.
Please be kind enough to help me with this issue
This is the log file data
Blockquote 0 verbose cli [ 0 verbose cli '/usr/local/bin/node', 0 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js', 0 verbose cli 'exec', 0 verbose cli '--', 0 verbose cli 'react-native', 0 verbose cli 'run-ios' 0 verbose cli ] 1 info using npm@7.4.0 2 info using node@v15.6.0 3 timing config:load:defaults Completed in 1ms 4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms 5 timing config:load:builtin Completed in 2ms 6 timing config:load:cli Completed in 1ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:/Users/vihagayohan/Desktop/ReactNative/Ikman/.npmrc Completed in 1ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/Users/vihagayohan/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 6ms 19 verbose npm-session b605b9422c99c9ad 20 timing npm:load Completed in 15ms 21 timing command:exec Completed in 71201ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) 22 verbose stack at ChildProcess.emit (node:events:379:20) 22 verbose stack at maybeClose (node:internal/child_process:1065:16) 22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:296:5) 23 verbose pkgid Ikman@0.0.1 24 verbose cwd /Users/vihagayohan/Desktop/ReactNative/Ikman 25 verbose Darwin 20.1.0 26 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "react-native" "run-ios" 27 verbose node v15.6.0 28 verbose npm v7.4.0 29 error code 1 30 error path /Users/vihagayohan/Desktop/ReactNative/Ikman 31 error command failed 32 error command sh -c react-native "run-ios" 33 verbose exit 1 0 verbose cli [ 0 verbose cli '/usr/local/bin/node', 0 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js', 0 verbose cli 'exec', 0 verbose cli '--', 0 verbose cli 'react-native', 0 verbose cli 'run-ios' 0 verbose cli ] 1 info using npm@7.4.0 2 info using node@v15.6.0 3 timing config:load:defaults Completed in 1ms 4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms 5 timing config:load:builtin Completed in 2ms 6 timing config:load:cli Completed in 1ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:/Users/vihagayohan/Desktop/ReactNative/Ikman/.npmrc Completed in 1ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/Users/vihagayohan/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 6ms 19 verbose npm-session b605b9422c99c9ad 20 timing npm:load Completed in 15ms 21 timing command:exec Completed in 71201ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) 22 verbose stack at ChildProcess.emit (node:events:379:20) 22 verbose stack at maybeClose (node:internal/child_process:1065:16) 22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:296:5) 23 verbose pkgid Ikman@0.0.1 24 verbose cwd /Users/vihagayohan/Desktop/ReactNative/Ikman 25 verbose Darwin 20.1.0 26 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "react-native" "run-ios" 27 verbose node v15.6.0 28 verbose npm v7.4.0 29 error code 1 30 error path /Users/vihagayohan/Desktop/ReactNative/Ikman 31 error command failed 32 error command sh -c react-native "run-ios" 33 verbose exit 1