Skip to content

Getting error on Ionic serve: TypeError: val.includes is not a function #5107

@ayushman1024

Description

@ayushman1024

Description:

Getting error on Ionic serve

Steps to Reproduce:

Run command ionic serve--host 0.0.0.0

Output:

Error:

TypeError: val.includes is not a function
at pushPairs (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\node_modules@ionic\cli-framework\lib\options.js:186:67)
at unparseArgs (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\node_modules@ionic\cli-framework\lib\options.js:238:13)
at ServeCommand.getCleanInputsForTelemetry (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\lib\command.js:136:62)
at async C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\lib\command.js:96:33
at async Promise.all (index 1)
at async ServeCommand.execute (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\lib\command.js:104:9)
at async Executor.run (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\lib\executor.js:55:9)
at async Executor.execute (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\node_modules@ionic\cli-framework\lib\executor.js:71:13)
at async Object.run (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli\index.js:111:9)

My ionic info:

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package.json'

   Require stack:
   - C:\Users\LENOVO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
   - C:\Users\LENOVO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
   - C:\Users\LENOVO\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
   - C:\Users\LENOVO\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

Ionic CLI : 7.2.1 (C:\Users\LENOVO\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 8.4.1
@angular-devkit/build-angular : 19.0.6
@angular-devkit/schematics : 19.0.6
@angular/cli : 19.0.6
@ionic/angular-toolkit : 12.1.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : 6.2.0
@capacitor/core : 6.2.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.10.0 (C:\Program Files\nodejs\node.exe)
npm : 10.8.1
OS : Windows 10

<paste here>

Other Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions