I have a react native project which is for both iOS and Android. I recently updated to react 17.0.2 and react-native 0.67.2 whilst developing for Android on my Windows machine. I have everything running and building fine in Android.
Jumping over to my mac and cloning my repo, I'm then doing the following...
cd ./ios
pod update
Doing so produces the following output...
[!] Invalid `Podfile` file: [!] /usr/local/bin/node -e try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}
/Users/cwd/Desktop/ReactApps/MYAPPNAME/node_modules/metro/src/Server.js:350
processRequest = (req, res, next) => {
^
SyntaxError: Unexpected token =
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
.
# from /Users/cwd/Desktop/ReactApps/MYAPPNAME/ios/Podfile:9
# -------------------------------------------
# target 'MyApp' do
> config = use_native_modules!
#
# -------------------------------------------
I get the exact same result when doing pod install
Prior to this, I was building the app in xcode and running it on my device without any issues.
Any help would be appreciated. Thanks!