I am facing a rather strange bug. If I react-native init through my terminal, cocoapods installs fine.
If I init a new project through vscode's integrated terminal, I get this error during pod install:
For help, see: https:/nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
[!] Invalid `Podfile` file: 859: unexpected token at ''.
# from /Users/XXXXX/Documents/test/ios/Podfile:7
# -------------------------------------------
# target 'test' do
> config = use_native_modules!
#
# -------------------------------------------
I have verified that my LANG variable is the same on both terminals: en_US.UTF-8
Ruby version: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21]
Cocoapods version: 1.11.3
I have tried installing ruby through brew, rbenv, rvm. The problem remains on all three. I am on MacOS Monterey 12.1 on M1.