Getting error while building ionic app for iOS

#1

i am using ionic 2 application and want to make build for iOS , i am getting some errors like:

bash-3.2# cordova build  ios
[xmldom error]	invalid doc source 
@#[line:0,col:undefined]
(node:10217) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'documentElement' of undefined

i am getting so much confused that how to resolve this. please help me out of this asap, this is very urgent for me now, please reply immediately.thanks in advance.

regards,
priyanka sharma

#2

What is your ionic info output?

#3
cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 
    Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

    Cordova Platforms : android 6.2.3
    Ionic Framework   : ionic1 1.3.1

System:

    Node : v9.10.1
    npm  : 4.2.0 
    OS   : Linux 4.4

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

#4

There is no ios platform added to your project. Run ionic cordova platform add ios first.
Also: You can’t build iOS project on non-macOS operating systems like Linux. You have to use a Mac for that.

#5

ok thanks for reply,
i resolve it.

#6

What exactly was the problem and how did you solve it?

#7

there is something storage problem in mac.