ionic cordova build ios
ng run app:ionic-cordova-build --platform=ios Error: Unknown argument: platform [ERROR] An error occurred while running subprocess ng.
ng run app:ionic-cordova-build --platform=ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
CodePudding user response:
It looks like you're running into permission issues. If you are installing npm-packages
then it might possible that you are getting an EACCES error when trying to install a package globally. This means you do not have permission to write to the directories npm
uses to store global packages and commands.
Try running commands:
sudo chmod u x -R 775 ~/.npm
sudo chown $USER -R ~/.npm
or you can just run any npm command with sudo, that should get resolve your issue.
sudo ionic cordova build ios
I'd recommend you to take a look at https://docs.npmjs.com/getting-started/fixing-npm-permissions
CodePudding user response:
try build ios with this command :
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"