ng run app:build
⠋ Generating browser application bundles (phase: setup)…An unhandled exception occurred: EACCES: permission denied, rmdir
See “/private/var/folders/vy/06f232jd7_v1b_4lk6fs9dhc0000gn/T/ng-2yZMyR/angular-errors.log” for further details.
[ERROR] An error occurred while running subprocess ng.
But I would recommend using some node manager like nvm that allows to install multiple node versions and switch from them and they don’t present permission problems.
spoijt@MacBook-Air-de-Geraldine-4 gastonShopBack % nvm use 18
Now using node v18.20.1 (npm v10.5.0)
spoijt@MacBook-Air-de-Geraldine-4 gastonShopBack % ionic cap sync
ng run app:build
⠋ Generating browser application bundles (phase: setup)…An unhandled exception occurred: EACCES: permission denied, rmdir ‘/Users/spoijt/Documents/gaston_back/gastonShopBack/www/assets’
See “/private/var/folders/vy/06f232jd7_v1b_4lk6fs9dhc0000gn/T/ng-sOOYfH/angular-errors.log” for further details.
[ERROR] An error occurred while running subprocess ng.
ng run app:build exited with exit code 127.
Re-running this command with the --verbose flag may provide more information.
As you created the app with sudo the permissions are broken for it even if you switch to nvm, you’ll have to fix the permissions on the app or create a new one and move the code
Remove ios and add it again. There will be no access issues. I used the shortcut provided by the vscode plugin and the output is as follows
[Ionic] Add iOS...
> npm install @capacitor/ios@6.0.0 --save-exact
up to date, audited 1229 packages in 4s
206 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
[Ionic] Add iOS...
> npx cap add ios
✔ Adding native Xcode project in ios in 25.19ms
✔ add in 25.52ms
✔ Copying web assets from browser to ios/App/App/public in 60.47ms
✔ Creating capacitor.config.json in ios/App/App in 5.22ms
✔ copy ios in 126.53ms
✔ Updating iOS plugins in 7.05ms