I can’t do cap add iOS without use SUDO. Because of this:
ionic cap add ios
npm i -E @capacitor/ios@4.0.1
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@es-joy/jsdoccomment@0.22.1’,
npm WARN EBADENGINE required: { node: ‘^12 || ^14 || ^16 || ^17’ },
npm WARN EBADENGINE current: { node: ‘v18.14.0’, npm: ‘9.3.1’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘eslint-plugin-jsdoc@38.1.4’,
npm WARN EBADENGINE required: { node: ‘^12 || ^14 || ^16 || ^17’ },
npm WARN EBADENGINE current: { node: ‘v18.14.0’, npm: ‘9.3.1’ }
npm WARN EBADENGINE }
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /Users/diezsoftware/Desktop/Proyectos/DiezSoftware.AsesorMovil/AsesorMovil_2/node_modules/@swc/core-android-arm-eabi
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir ‘/Users/diezsoftware/Desktop/Proyectos/DiezSoftware.AsesorMovil/AsesorMovil_2/node_modules/@swc/core-android-arm-eabi’
npm ERR! [Error: EACCES: permission denied, mkdir ‘/Users/diezsoftware/Desktop/Proyectos/DiezSoftware.AsesorMovil/AsesorMovil_2/node_modules/@swc/core-android-arm-eabi’] {
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘/Users/diezsoftware/Desktop/Proyectos/DiezSoftware.AsesorMovil/AsesorMovil_2/node_modules/@swc/core-android-arm-eabi’
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/diezsoftware/.npm/_logs/2023-05-24T08_02_29_818Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm i -E @capacitor/ios@4.0.1 exited with exit code 243.
Re-running this command with the --verbose flag may provide more information.
but if I use SUDO, then cocoapods says that I can’t use SUDO on the sync process…
sudo ionic cap add ios
npm i -E @capacitor/ios@4.0.1
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@es-joy/jsdoccomment@0.22.1’,
npm WARN EBADENGINE required: { node: ‘^12 || ^14 || ^16 || ^17’ },
npm WARN EBADENGINE current: { node: ‘v18.14.0’, npm: ‘9.3.1’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘eslint-plugin-jsdoc@38.1.4’,
npm WARN EBADENGINE required: { node: ‘^12 || ^14 || ^16 || ^17’ },
npm WARN EBADENGINE current: { node: ‘v18.14.0’, npm: ‘9.3.1’ }
npm WARN EBADENGINE }
up to date, audited 1470 packages in 3s
154 packages are looking for funding
run npm fund
for details
25 vulnerabilities (10 moderate, 11 high, 4 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit
for details.
capacitor add ios
[capacitor]
Adding native Xcode project in ios in 63.40ms
[capacitor]
add in 64.11ms
[capacitor]
Copying web assets from www to ios/App/App/public in 361.19ms
[capacitor]
Creating capacitor.config.json in ios/App/App in 870.75μs
[capacitor] [info] Found 12 Cordova plugins for ios:
[capacitor] cordova-launch-review@4.0.1
[capacitor] cordova-plugin-advanced-http@3.2.2
[capacitor] cordova-plugin-app-version@0.1.13
[capacitor] cordova-plugin-device@2.0.3
[capacitor] cordova-plugin-document-viewer@1.0.0
[capacitor] cordova-plugin-file@6.0.2
[capacitor] cordova-plugin-file-opener2@3.0.5
[capacitor] cordova-plugin-fingerprint-aio@5.0.1
[capacitor] cordova-plugin-inappbrowser@5.0.0
[capacitor] cordova-plugin-network-information@3.0.0
[capacitor] cordova-plugin-screen-orientation@3.0.2
[capacitor] es6-promise-plugin@4.2.2
[capacitor]
copy ios in 523.04ms
[capacitor]
Updating iOS plugins in 15.52ms
[capacitor] [info] Found 18 Capacitor plugins for ios:
[capacitor] @capacitor/action-sheet@4.0.1
[capacitor] @capacitor/app@4.0.1
[capacitor] @capacitor/app-launcher@4.0.1
[capacitor] @capacitor/browser@4.0.1
[capacitor] @capacitor/camera@4.0.1
[capacitor] @capacitor/device@4.0.1
[capacitor] @capacitor/dialog@4.0.1
[capacitor] @capacitor/filesystem@4.0.1
[capacitor] @capacitor/geolocation@4.0.1
[capacitor] @capacitor/haptics@4.0.1
[capacitor] @capacitor/keyboard@4.0.1
[capacitor] @capacitor/local-notifications@4.0.1
[capacitor] @capacitor/network@4.0.1
[capacitor] @capacitor/preferences@4.0.1
[capacitor] @capacitor/push-notifications@4.0.1
[capacitor] @capacitor/splash-screen@4.0.1
[capacitor] @capacitor/status-bar@4.0.1
[capacitor] @capacitor/toast@4.0.1
[capacitor] [info] Found 12 Cordova plugins for ios:
[capacitor] cordova-launch-review@4.0.1
[capacitor] cordova-plugin-advanced-http@3.2.2
[capacitor] cordova-plugin-app-version@0.1.13
[capacitor] cordova-plugin-device@2.0.3
[capacitor] cordova-plugin-document-viewer@1.0.0
[capacitor] cordova-plugin-file@6.0.2
[capacitor] cordova-plugin-file-opener2@3.0.5
[capacitor] cordova-plugin-fingerprint-aio@5.0.1
[capacitor] cordova-plugin-inappbrowser@5.0.0
[capacitor] cordova-plugin-network-information@3.0.0
[capacitor] cordova-plugin-screen-orientation@3.0.2
[capacitor] es6-promise-plugin@4.2.2
[capacitor]
Updating iOS native dependencies with pod install - failed!
[capacitor]
update ios - failed!
[capacitor] [error] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /Users/diezsoftware/Desktop/Proyectos/DiezSoftware.AsesorMovil in PATH, mode 040777
[capacitor] /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:439:in help!': [!] You cannot run CocoaPods as root. (CLAide::Help) [capacitor] [capacitor] Usage: [capacitor] [capacitor] $ pod COMMAND [capacitor] [capacitor] CocoaPods, the Cocoa library package manager. [capacitor] [capacitor] Commands: [capacitor] [capacitor] + cache Manipulate the CocoaPods cache [capacitor] + env Display pod environment [capacitor] + init Generate a Podfile for the current directory [capacitor] + install Install project dependencies according to versions from a [capacitor] Podfile.lock [capacitor] + ipc Inter-process communication [capacitor] + lib Develop pods [capacitor] + list List pods [capacitor] + outdated Show outdated project dependencies [capacitor] + repo Manage spec-repositories [capacitor] + setup Set up the CocoaPods environment [capacitor] + spec Manage pod specs [capacitor] + update Update outdated project dependencies and create new Podfile.lock [capacitor] [capacitor] Options: [capacitor] [capacitor] --allow-root Allows CocoaPods to run as root [capacitor] --silent Show nothing [capacitor] --version Show the version of the tool [capacitor] --verbose Show more debugging information [capacitor] --no-ansi Show output without ANSI codes [capacitor] --help Show help banner of specified command [capacitor] from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:102:in
ensure_not_root_or_allowed!’
[capacitor] from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:48:in run' [capacitor] from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/bin/pod:55:in
<top (required)>’
[capacitor] from /usr/local/bin/pod:23:in load' [capacitor] from /usr/local/bin/pod:23:in
’
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
capacitor add ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.