error: occurred while running subprocess Cordova while adding platform iOS - ios

When I try to run
ionic platform add ios --verbose
it fails with the following error:
An error occurred while running subprocess Cordova.
I got an extra info on an error by running cmd with --verbose flag and I think this could be the reason for the error.
No scripts found for hook "after_platform_add".
also when it is installing plugins while adding platform
No scripts found for hook "after_plugin_install".
No scripts found for hook "before_plugin_install".
this is the log I am getting.
can anyone help with this?

Related

ionic fails to add iOS platform

when I try the following command in VS Code
sudo ionic cordova platform add iOS
I get an error with the following:
ERROR] An error occurred while running subprocess cordova.
cordova platform add ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I get iOS folder in platforms folder, but how to solve this error ?
First, why are you running with sudo? I would recreate the project in a directory which does not require this. For example ~/dev/myProjectName
Second, when you scroll up it should give a more specific error.
Third, if not have you tried doing as shown and run with --verbose flag?
Fourth, try opening platform/ios project in xCode and running from there. It may give more useful info.

requiring unknown module "519" ReactNative

Error info
requiring unknown module "519", if you are sure the module exists, try
restarting Metro. You may also want to run 'yarn' or 'npm install'
I just add ant-design in my rn program and run pod install and restart android app.
No error in my iOS Application, but wrong with Android application.
What can I do to fix that?
Have you tried with npm install? Usually the error means that you don't have installed a plugin or that you are importing something in the wrong mode.

Failing to build an iOS app built using Cordova / Ionic using Azure DevOps

Trying to build an iOS app built using Ionic / Cordova on Azure DevOps
Getting this error:
Using cordova-fetch for cordova-ios#^5.0.0
Failed to fetch platform cordova-ios#^5.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: Cannot find module 'UNMET/package.json' from '/Users/vsts/agent/2.148.2/work/1/s'
[ERROR] An error occurred while running subprocess cordova.
I am using a simple setup using the following steps:
Agent: Hosted macOs
npm install
Ionic Command [ionic version: 4.12.0; Cordova Version: default]
Publish Build Artifacts
We had the same problem, and the solution was to make sure all NPM dependencies were met.
Check the logs for the npm install step and see if there are any unmet dependencies there and add/update missing depedencies in your package.json file.

meteor cordova build error for ios platform

I am getting the error below when building meteor with ios platform. A few days ago it all worked fine. OS is Sierra 10.12, meteor 1.4.1.3. When I remove the ios platform it builds fine. Android is not added.
I already tried:
Removed and added ios platform
Removed .meteor/local
Here is the output from the terminal:
Tims-MacBook-Pro:pressIt cmt$ meteor build ../outputPressit --server http://dummy.com
...
=> Errors executing Cordova commands:
While adding plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5 to Cordova project:
Cordova error: Failed to fetch plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
fatal: reference is not a tree: 8bf95eed3f313299fc2de33658866278eea2cdc5
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the issue.)
I also tried the --verbose option and here is some of the output:
...
%% Copying splash from /Users/cmt/WebstormProjects/pressIt/.meteor/local/cordova-build/resources/iphone6p_landscape.splash.png to /Users/cmt/WebstormProjects/pressIt/.meteor/local/cordova-build/platforms/ios/pressIt/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png
%% updated project successfully
%% Executing "after_plugin_add" hook for all plugins.
Adding plugin https://github.com/meteor/cordova-plugin-meteor weba90-]\m8
-=05643pp.git#8bf95eed3f313299fc2de33658866278eea2cdc5 to Cordova project
%% Executing "before_plugin_add" hook for all plugins.
%% Calling plugman.fetch on plugin "https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5"
%% Fetching plugin "https://github.com/meteor/cordova-plugin-meteor-webapp.git" via git clone
%% Running command: git clone https://github.com/meteor/cordova-plugin-meteor-webapp.git /var/folders/p7/s_tltgm15mg63r15wkn1c24c0000gq/T/git/1477224169788
%% Command finished with error code 0: git clone,https://github.com/meteor/cordova-plugin-meteor-webapp.git,/var/folders/p7/s_tltgm15mg63r15wkn1c24c0000gq/T/git/1477224169788
%% Running command: git checkout 8bf95eed3f313299fc2de33658866278eea2cdc5
%% Command finished with error code 128: git checkout,8bf95eed3f313299fc2de33658866278eea2cdc5
=> Errors executing Cordova commands:
While adding plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5 to Cordova project:
Cordova error: Failed to fetch plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
fatal: reference is not a tree: 8bf95eed3f313299fc2de33658866278eea2cdc5
at /Users/cmt/.meteor/packages/meteor-tool/.1.4.1_3.1u5hjow++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/plugman/fetch.js:88:33
at _rejected
This seemed to have been a temporary issue as it got resolved the next day without making related changes.

Apache Cordova - cordova platform add iOS failed

I seriously need help in this area. This is my first time working with the iOS platform for apache cordova. I have already downloaded the latest Node.js tool and Apache Cordova on my macbook. The PATH is also set up already. I was following the Apache Cordova command line steps, and when I tried to run the following command:
cordova platform add ios
I received the following error message:
/Users/metanoiasherman/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create: line 80: dirname: command not found
cat: /Users/metanoiasherman/DropPositioning/../CordovaLib/VERSION: No such file or directory
Error: /Users/metanoiasherman/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/create: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
This is what my $PATH prints out in Terminal:
/Users/metanoiasherman/./usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/lib/node_modules/cordova/bin/
Can anyone tell me what I need to do?
I have just downloaded the Xcode command line tools and installed it already. Do I have to restart my macbook? Can someone present me with the steps I need to take to solve this and progress on?
It might be an issue with your $PATH
Try to run
$PATH
from the terminal and check if that includes the same path stated when you run:
which cordova

Resources