Failed to fetch platform cordova-ios@~4.5.4
See original GitHub issueDescription: I started building ios in mac pro but failed
Steps to Reproduce:
- running ionic cordova build ios
Output: 902labdeMacBook-Pro:902Scratch-ionic 902lab$ ionic cordova build ios
cordova platform add ios –save Using cordova-fetch for cordova-ios@~4.5.4
(node:1253) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch platform cordova-ios@~4.5.4 Probably this is either a connection problem, or platform spec is incorrect. Check your connection and platform name/version/URL. Error: npm: Command failed with exit code 1 Error output: Unhandled rejection RangeError: Maximum call stack size exceeded at RegExp.test () at /usr/local/lib/node_modules/npm/node_modules/aproba/index.js:38:16 at Array.forEach () at module.exports (/usr/local/lib/node_modules/npm/node_modules/aproba/index.js:33:11) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:37:3) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) at flatNameFromTree (/usr/local/lib/node_modules/npm/lib/install/flatten-tree.js:39:14) npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! A complete log of this run can be found in: npm ERR! /Users/902lab/.npm/_logs/2018-03-05T07_14_42_840Z-debug.log (node:1253) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Running app-scripts build: –platform ios –target cordova [15:14:45] build dev started … [15:14:45] clean started … [15:14:45] clean finished in 1 ms [15:14:45] copy started … [15:14:45] transpile started … [15:14:48] transpile finished in 2.96 s [15:14:48] preprocess started … [15:14:48] deeplinks started … [15:14:48] deeplinks finished in 5 ms [15:14:48] preprocess finished in 5 ms [15:14:48] webpack started … [15:14:48] copy finished in 3.17 s [15:14:56] webpack finished in 7.99 s [15:14:56] sass started … [15:14:57] sass finished in 993 ms [15:14:57] postprocess started … [15:14:57] removed unused font files [15:14:57] postprocess finished in 9 ms [15:14:57] lint started … [15:14:57] build dev finished in 12.11 s
cordova build ios (node:1270) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: No platforms added to this project. Please use cordova platform add <platform>. (node:1270) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[15:15:00] tslint: src/pages/chapter/chapter.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { IonicPage, NavController, NavParams, ToastController } from ‘ionic-angular’; L3: import { DomSanitizer } from ‘@angular/platform-browser’; [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 9 ‘jquery’ is declared but never used.
L8: import { Renderer2, ElementRef } from ‘@angular/core’; L9: declare var jquery:any; L10: declare var $ :any; [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 36 Property ‘sanitize’ is declared but never used.
L35: constructor(public navCtrl: NavController, public navParams: NavParams, L36: public http: Http, private sanitize:DomSanitizer, L37: private renderer: Renderer2, private el: ElementRef) { [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 37 Property ‘renderer’ is declared but never used.
L36: public http: Http, private sanitize:DomSanitizer, L37: private renderer: Renderer2, private el: ElementRef) { L38: this.lesson_segment = “introduction”; [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 37 Property ‘el’ is declared but never used.
L36: public http: Http, private sanitize:DomSanitizer, L37: private renderer: Renderer2, private el: ElementRef) { L38: this.lesson_segment = “introduction”; [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 66 ‘doc’ is declared but never used.
L65: $(“#iframe”).load(function() { L66: var doc = this.contentDocument || this.contentWindow.document; L67: var target = $(“p”); [15:15:00] tslint: src/pages/lesson/lesson.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { IonicPage, NavController, NavParams } from ‘ionic-angular’; L3: import {Http} from ‘@angular/http’; [15:15:00] tslint: src/pages/course/course.ts, line: 3 All imports are unused.
L2: import {NavController} from ‘ionic-angular’; L3: import { NgIf } from ‘@angular/common’; L4: import {Http, Headers} from ‘@angular/http’; [15:15:00] tslint: src/pages/about-detail/about-detail.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { IonicPage, NavController, NavParams } from ‘ionic-angular’; [15:15:00] tslint: src/pages/signup/signup.ts, line: 1 ‘NgModule’ is declared but never used.
L1: import { Component, NgModule } from ‘@angular/core’; L2: import { IonicPage, NavController, NavParams } from ‘ionic-angular’; [15:15:00] tslint: src/pages/login/login.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { IonicPage, NavController, NavParams } from ‘ionic-angular’; L3: import {Validators, FormBuilder,FormGroup } from ‘@angular/forms’; [15:15:00] tslint: src/pages/login/login.ts, line: 7 All imports are unused.
L6: import { Storage } from ‘@ionic/storage’; L7: import { Events } from ‘ionic-angular’; L8: import {SignupPage} from “…/signup/signup”; [15:15:00] tslint: src/components/tree-view/tree-view.ts, line: 1 ‘forwardRef’ is declared but never used.
L1: import { Component, forwardRef, Input } from ‘@angular/core’; [15:15:00] tslint: src/pages/product-detail/product-detail.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import {Component} from ‘@angular/core’; L2: import {IonicPage, NavController, NavParams, PopoverController} from ‘ionic-angular’; L3: import {DomSanitizer} from ‘@angular/platform-browser’; [15:15:00] tslint: src/pages/product-detail/product-detail.ts, line: 8 All imports are unused.
L7: import {PersonalCenterPage} from “…/personal-center/personal-center”; L8: import {TreeViewComponent} from “…/…/components/tree-view/tree-view”; [15:15:00] tslint: src/pages/my/my.ts, line: 2 ‘Events’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { NavController, Events } from ‘ionic-angular’; L3: import {LoginPage} from “…/login/login”; [15:15:00] tslint: src/pages/my/my.ts, line: 4 All imports are unused.
L3: import {LoginPage} from “…/login/login”; L4: import { Storage } from ‘@ionic/storage’; L5: import {AboutDetailPage} from “…/about-detail/about-detail”; [15:15:00] tslint: src/pages/my/my.ts, line: 5 All imports are unused.
L4: import { Storage } from ‘@ionic/storage’; L5: import {AboutDetailPage} from “…/about-detail/about-detail”; L6: import { NgIf } from ‘@angular/common’; [15:15:00] tslint: src/pages/my/my.ts, line: 6 All imports are unused.
L5: import {AboutDetailPage} from “…/about-detail/about-detail”; L6: import { NgIf } from ‘@angular/common’; L7: import {AuthService} from “…/…/service/AuthService”; [15:15:00] tslint: src/pages/products-list-view/products-list-view.ts, line: 47 Property ‘popoverCtrl’ is declared but never used.
L46: orderType: string = “time-Order”; L47: or(public navCtrl: NavController, public http:Http, private popoverCtrl: PopoverController, public navParams L48: public settingService: SettingService, public toastCtrl: ToastController) { [15:15:00] tslint: src/pages/products-list-view/products-list-view.ts, line: 2 ‘IonicPage’ is declared but never used.
L1: import { Component } from ‘@angular/core’; L2: import { IonicPage, NavController, PopoverController, NavParams, ToastController } from ‘ionic-angular’; L3: import {Http} from ‘@angular/http’; [15:15:00] tslint: src/pages/products-list-view/products-list-view.ts, line: 8 All imports are unused.
L7: import {SettingService} from “…/…/service/SettingService”; L8: import { NgIf } from ‘@angular/common’; [15:15:00] tslint: src/app/app.module.ts, line: 35 All imports are unused.
L34: import {PersonalCenterPage} from “…/pages/personal-center/personal-center”; L35: import {TreeViewComponent} from “…/components/tree-view/tree-view”; [15:15:00] tslint: src/pages/favorite/favorite.module.ts, line: 4 All imports are unused.
L3: import { FavoritePage } from ‘./favorite’; L4: import { ItemSliding } from ‘ionic-angular’;
My ionic info
:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1 global packages:
cordova (Cordova CLI) : 8.0.0 local packages:
@ionic/app-scripts : 2.1.4 Cordova Platforms : none Ionic Framework : ionic-angular 3.6.1 System:
Node : v8.9.4 npm : 5.7.1 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40b Environment Variables:
ANDROID_HOME : not set Misc:
backend : pro
Other Information:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
@dwieeb I had the same error but I actually never use Mac. I made the mistake of cloning and installing everything using
sudo
. When I started over without using a single sudo, everything went smoothly. Thanks!@s1lviu I’m not sure how that error relates to the original issue, but please see the following line in your error message:
npm WARN checkPermissions Missing write access to /Users/silviu/IonicProjects/learning-ionic-plugins/node_modules/cordova-plugin-boottime
Your directory permissions appear incorrect.