Ionic-framework: process.stdout.getWindowSize is not a function

Created on 8 Jun 2016  路  3Comments  路  Source: ionic-team/ionic-framework

Short description of the problem:

I can't seem to use certain commands from the ionic CLI from non-terminals.
This code:

<?php

shell_exec('ionic package list');

Will result in something along the lines of:

> [email protected] postinstall /home/ubuntu/workspace/storage/ap"...
The resources folder already exists. We will not overwrite your files unless you pass the --force argument.
Running with the force flag will overwrite your resources directory and modify your config.xml file
splash ios Default-Landscape@~ipadpro.png (2732x2048) skipped, source image splash.png (2208x2208) too small
splash ios Default-Portrait@~ipadpro.png (2048x2732) skipped, source image splash.png (2208x2208) too small

TypeError: process.stdout.getWindowSize is not a function
    at /home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/lib/ionic/package.js:181:42
    at _fulfilled (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:749:13)
    at /home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:557:44
    at flush (/home/ubuntu/.nvm/versions/node/v4.4.0/lib/node_modules/ionic/node_modules/q/q.js:108:17)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)


process.stdout.getWindowSize is not a function (CLI v2.0.0-beta.30)

I'm building a Laravel app to display the status of some running build tasks.

What behavior are you expecting?

Something... less... error-y?

Steps to reproduce:

  1. Open editor
  2. Paste codesnippet #1 into editor
  3. Save in app root
  4. Run
  5. Receive error

Other information:
Here's the my ionic info

Your system information:

Cordova CLI: Not installed
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS: Distributor ID:     Ubuntu Description:     Ubuntu 14.04.3 LTS 
Node Version: v4.4.0


******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     

 Please install your Cordova CLI to version  >=4.2.0 `npm install -g cordova`

******************************************************

I don't think I need Cordova as I'm not packaging (if that requires Cordova at all?) or compiling the app here.

Which Ionic Version? 1.x or 2.x
CLI v2.0.0-beta.30

All 3 comments

Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum (forum.ionicframework.com). Thanks for using Ionic!

this is a bug! A console script that errors out when u try to assign its output to a variable or a file is clearly buggy.

If we were able to parse the output of ionic list package we would be able to determine the last good build and then feed the build id to ionic package download for example.

CLI scripting is all about being able to chain commands one after the other, imho.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandyscarney picture brandyscarney  路  3Comments

Nick-The-Uncharted picture Nick-The-Uncharted  路  3Comments

alexbainbridge picture alexbainbridge  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments