''cordova platform add ios' returns 'Failed to fetch platform cordova-ios@^6.1.0'
Trying to follow the Create Your First Cordova App
instructions at https://cordova.apache.org/docs/en/latest/guide/cli/, when trying to add any platform, I get an error. I'm on a Mac, used brew to install node/npm. Node is version 15.1.0, npm is version 7.0.9.
$ cordova platform add ios
Using cordova-fetch for cordova-ios@^6.1.0
Failed to fetch platform cordova-ios@^6.1.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
CordovaError: CordovaError: Could not determine package name from output:
added 87 packages, and audited 87 packages in 2s
3 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Solution 1:[1]
try
npm i -g cordova
and then
cordova platform add ios@latest
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nibin Benjamin |