Giter Site home page Giter Site logo

ionic-app-lib's Introduction

Deprecated!

This library is for legacy CLI v2. For the latest CLI, which supports all Ionic Framework versions, see the CLI repo.

ionic-app-lib's People

Contributors

adamdbradley avatar brandyscarney avatar danbucholtz avatar domhnallw avatar emilyemorehouse avatar ericb avatar fuiste avatar iamchrismiller avatar icyflame avatar imhoffd avatar jamescheuk91 avatar jbavari avatar jdart avatar jthoms1 avatar kentongray avatar kylefox avatar lewisl9029 avatar mhartington avatar misaxi avatar mlynch avatar mpm avatar rdrenker avatar rhalff avatar simplesmiler avatar talamaska avatar tlancina avatar tq-jappy avatar trestini avatar xieren58 avatar zxc122333 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-app-lib's Issues

[io-config] explicit error message for corrupted file?

When trying to upload an app to ionic view I had this error :

> ionic upload
Uploading app....
undefined:1



SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:179:28
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)

Turned out that my .io-config.json file was empty, after removing it it worked. Would it make sense to have a more explicit error message here, or is it an edge case? It's a project I took over so probably they emptied the file manually for privacy reasons.

2.0.0-beta: please support CoffeeScript gulpfiles

In 1.x the gulpStartupTasks were correctly found in CoffeeScript versions of the gulpfile, i.e.:

Gulpfile.coffee
Gulpfile.litcoffee
gulpfile.coffee
gulpfile.litcoffee

but v2.x only tries to load the gulpfile from:

Gulpfile.js
gulpfile.js

as per lib/cli.js loadGulpfile().

question:

I see that ionic-app-lib depends on npm package ionic-cordova-lib

Why does it depends on ionic-cordova-lib and not the Apache Cordova package cordova-lib that we release to npm?

What are the differences?

Where can I see the source code for ionic-cordova-lib? the git url points to apache git, but that can't be because at least package.json should be different with package name.

By the way I'm not a troll, I'm a Apache Cordova committer :-).

Keep the great work !!

Possibility to use ionic-app-lib in a project using Yeoman generator

My Ionic project was built using Yeoman and its generator-misha instead of ionic-cli, and because of that it has a different file structure before it builds.

In order to use Ionic.io (the main issue occurs during ionic io init) features I added the ionic-platform-web-client using Bower and then the plugin ionic-plugin-deploy was added using gulp which has a task to add plugins using cordova (running from shell instead of cordova-lib).

The reason for this issue is that in ionic-app-lib the directory to ionic.o.bundle.js where it tries to insert my appId is hardcoded and so, I cannot use this lib on another project that uses a not Ionic conventional file structure.

io-config.js

var CORE_FILE = './www/lib/ionic-platform-web-client/dist/ionic.io.bundle.js';
var CORE_FILE_MIN = './www/lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js';
var CONFIG_BACKUP = './.io-config.json'
var INDEX_FILE = './www/index.html';
var APP_FILE = './www/js/app.js';
var TMP_ERR = './errors.html'
var IO_COMPONENTS = {
  'ionic-platform-web-client': {
    name: 'ionic.service.core',
    path: 'lib/ionic-platform-web-client/dist/ionic.io.bundle.js',
    minPath: 'lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js',
    config: [
      {key: 'dev_push', value: 'true'}
    ]
  },
  'ngCordova': {
    name: 'ngCordova',
    path: 'lib/ngCordova/dist/ng-cordova.js',
    minPath: 'lib/ngCordova/dist/ng-cordova.js',
    config: []
  }
};

My proposal is to get the bower dependencies installation directory from the .bowerrc and the documentRoot from ionic.project and build the location for ionic.io.bundle.js dynamically.

If you don't mind I can send you a PR.

If I'm wrong, please help me to use it right.

Thank you very much.

Replace Livereload by BrowserSync ?

Hi,

What do you think about replace LiveReload by BrowerSync ?

BrowserSync have more usefull features :

  • interaction sync = scroll, click, refresh and form actions are mirrored between browsers while you test
  • a configuration panel

This library can be very beneficial for development.
You should have a look.

http://www.browsersync.io/
https://github.com/BrowserSync/browser-sync
Comparison between Livereload, BrowserSync, Codekit

Are you against this idea ?
I would like to contribute to add BrowserSync.

Problem calling Serve.stopServer after Serve.start for automated tests

Hi!

I was trying to use the ionic serve feature to execute some automated tests on my app using the following:

//some code
var promise = Q();
  return promise
 .then(function() {
      return Serve.start(options);
})
.then(function(){
        //execute some tests
})
.finally(function(){
        return Serve.stopServer();
});

But, I was getting an error stating that the server was not running. Looking at the code of server.js I found out that when Serve.start is called, it doesn't wait for the server to really start before returning, so we had no garantee that the server would be running when Server.stop is called.

Therefore, I propose the following solution:

Serve.startServer = function startServer(options, app) {
// original code

  // Listen
  var q = Q.defer();
  app.use(server);
  try {
    runningServer = app.listen(options.port, options.address,function(){
        logging.logger.info('Running dev server: '.green.bold, options.devServer);
        q.resolve()
    });
  }catch(ex) {
    q.reject(Utils.fail('Failed to start the Ionic server: ', ex.message));
  }

  return q.promise;
}

WHat do you think?

Merge bug in resources.js

look for this code in resources.js. Removing the .catch(console.error) makes ionic resources fail silently in some cases.

// <<<<<<< HEAD:lib/resources/generate.js
// .then(updateConfigData)
// .catch(console.error);
// =======
.then(updateConfigData);
// >>>>>>> package:lib/resources.js

Add support for custom builds

Currently ionic cli supports only builds which use gulpfile.

I'd like to have support for any build process. This can be achieved through npm scripts. So, just check if there are "ionic.build" script and if so, invoke it instead of gulp task

Update: this way people will be able to use whatever build system they want (i.e., gulp, gulp.coffee, gulp.babel, webpack, grunt, etc)

Give resource generate the capability to pad images rather than cropping them

Add the moment if the resource generator has to create a rectangular image, it crops a rectangular section from the center of the supplied square source image.

It would be useful to add a 'pad' option - e.g. 'pad: "#ffffff" that supplies an RGB background colour.

When pad is used, the resource generator should create a solid rectangular image of the specified background colour and then paste the complete square source image into the center of the target.

Obviously, this would require support from the online image generator.

resource.generate fails if current working directory is not the cordova app directory

The utility function resource.generate takes a path to the directory of the app (appDirectory). In most places the appDirectory is used when determining directories. However there is a line that tries to create a directory and does not join with appDirectory.

      var platformResourceDir = path.join(Settings.resourceDir, platform);
      var resTypeDir = path.join(platformResourceDir, Settings[resType + 'Dir']);

      if (!fs.existsSync(platformResourceDir)) {
        fs.mkdirSync(platformResourceDir);
      }

This will cause the function to fail.

[start] - provide a helpful message when start with template fails for v2

For v1 - when a start command fails with an invalid template, it shows the user a message to view templates.

Creating Ionic app in folder /Users/JoshBavari/Development/testing/v1 based on asdlfkj project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic-starter-asdlfkj/archive/master.zip
 ✗ Not found: https://github.com/driftyco/ionic-starter-asdlfkj/archive/master.zip (404)
 ✗ Please verify the url and try again.
Please verify you are using a valid URL or a valid ionic starter.
View available starter templates: `ionic templates`
More info available at: 
http://ionicframework.com/getting-started/
https://github.com/driftyco/ionic-cli

For v2 - we need a way to view templates. However, we do not want to show templates for v1 that are not available for v2.

How to actually run the tests

I have forked and cloned the repository on Windows machine. I tried to run the tests, but I'm failing on serve.spec.

Failures:

  1) Serve #loadSettings should parse out options from arg hash
   Message:
     Expected 'www\index.html' to be 'www/index.html'.
   Stacktrace:
     Error: Expected 'www\index.html' to be 'www/index.html'.
    at compareOptions (C:\server\www\ionic-app-lib\spec\serve.spec.js:42:30)
    at null.<anonymous> (C:\server\www\ionic-app-lib\spec\serve.spec.js:95:9)

  2) State should get the package json by app directory
   Message:
     Expected spy readInPackageJson to have been called with [ '/test/dev/ionic/package.json' ] but actual calls were [ '\test\dev\ionic\package.json' ]
   Stacktrace:
     Error: Expected spy readInPackageJson to have been called with [ '/test/dev/ionic/package.json' ] but actual calls were [ '\test\dev\ionic\package.json' ]
    at null.<anonymous> (C:\server\www\ionic-app-lib\spec\state.spec.js:24:37)

Finished in 2.009 seconds
167 tests, 296 assertions, 2 failures, 0 skipped



npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "jasmine"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] jasmine: `jasmine-node --captureExceptions  ./spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] jasmine script 'jasmine-node --captureExceptions  ./spec'.
npm ERR! This is most likely a problem with the ionic-app-lib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     jasmine-node --captureExceptions  ./spec
npm ERR! You can get their info via:
npm ERR!     npm owner ls ionic-app-lib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\server\www\ionic-app-lib\npm-debug.log

and the npm-log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'jasmine' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prejasmine', 'jasmine', 'postjasmine' ]
5 info prejasmine [email protected]
6 info jasmine [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec jasmine script
9 verbose stack Error: [email protected] jasmine: `jasmine-node --captureExceptions  ./spec`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid [email protected]
11 verbose cwd C:\server\www\ionic-app-lib
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "jasmine"
14 error node v0.12.4
15 error npm  v2.10.1
16 error code ELIFECYCLE
17 error [email protected] jasmine: `jasmine-node --captureExceptions  ./spec`
17 error Exit status 1
18 error Failed at the [email protected] jasmine script 'jasmine-node --captureExceptions  ./spec'.
18 error This is most likely a problem with the ionic-app-lib package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     jasmine-node --captureExceptions  ./spec
18 error You can get their info via:
18 error     npm owner ls ionic-app-lib
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

So my question is, how we are supposed to run the tests? Do we need to be inside some ionic project or those tests should be able to run alone independently? Is there something else I can do to be able to run tests on Windows?

Consistent Error Handling

We should have a consistent way to return errors via code execution and http responses. For example: assume we have a simple json structure like:

{
  "errors": [
    {
      "message": "App name is too long. Please use a shorter name.",
      "meta": {},
    },
    {
       "message": "Unable to find location of .io-config.json"
    }
  ]
}

We should be able to adhere to that schema within code as well as http responses that can be sent from our services. There should be a processor available to read in responses / exceptions to produce these structures and then the CLI should have a single source to display them.

[PATCH] Upload: Wrong ZIP File when DocumentRoot Ends with a Slash or is Absolute

I have the following in my ionic.project:

{
  "documentRoot": "www/"
}

Note that trailing slash.

ionic upload will generate the full name of the ZIP file (the www.zip) as:

/full/path/to/project/www/.zip

After the ZIP has been successfully created (as www/.zip), the uploading code will try to locate it in

/full/path/to/project/www.zip

and will fail, with an error message like this:

phil@otr% ionic upload
Uploading app....
An error occurred uploading the build: Error: ENOENT: no such file or directory, open '/path/to/app/www.zip'

Error: ENOENT: no such file or directory, open '/path/to/app/www.zip'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.uploadToS3 (/home/phil/opt/n/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/upload.js:112:14)
    at /home/phil/opt/n/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/upload.js:56:21
    at _fulfilled (/home/phil/opt/n/lib/node_modules/ionic/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/home/phil/opt/n/lib/node_modules/ionic/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/home/phil/opt/n/lib/node_modules/ionic/node_modules/q/q.js:749:13)
    at /home/phil/opt/n/lib/node_modules/ionic/node_modules/q/q.js:557:44
    at flush (/home/phil/opt/n/lib/node_modules/ionic/node_modules/q/q.js:108:17)
    at doNTCallback0 (node.js:408:9)
    at process._tickCallback (node.js:337:13)

ENOENT: no such file or directory, open '/path/to/app/www.zip' (CLI v1.7.0)

The problem is how the ZIP file's path is generated in ionic-app-lib/lib/upload.js:

Utils.createArchive = function(appDirectory, documentRoot) {
  // ...
  var zipPath = path.join(appDirectory, documentRoot);
  // ...
  var zipDestination = zipPath + ".zip"
  // ...
}

path.join() will correctly concatenate the paths, but it won't remove the trailing slash. Furthermore, the would be also wrong if DocumentRoot specified in ionic.project is an absolute path.

The correct solution is to use path.resolve:

--- /home/phil/src/ionic/ionic-app-lib.git/lib/utils.js
+++ /home/phil/opt/n/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/utils.js
@@ -49,7 +51,7 @@
  */
 Utils.createArchive = function(appDirectory, documentRoot) {
   var q = Q.defer();
-  var zipPath = path.join(appDirectory, documentRoot);
+  var zipPath = path.resolve(appDirectory, documentRoot);

   logging.logger.debug('Now zipping contents of ' + zipPath);

@@ -57,7 +59,8 @@
     q.reject(documentRoot + ' directory cannot be found. Make sure the working directory is at the top level of an Ionic project.', 'upload');
   }

-  var zipDestination = zipPath + ".zip"
+  var zipDestination = path.join(zipPath + ".zip");
+  logging.logger.debug('ZIP file: ' + zipDestination);
   var zip = fs.createWriteStream(zipDestination);

   var archive = archiver('zip');

`ionic resources` doesn't support windows platform

It seems that lib/resources doesn't support the windows platform. Only ios, android and wp8.

Is this intended, or just not implemented yet?

The problem I'm having right now is that for a iOS, Android and Windows Phone 8.1/Windows 10 app, running ionic resources doesn't generate any Windows icons or splash screens.

See: https://github.com/driftyco/ionic-app-lib/blob/master/lib/resources.js#L36

It looks like it could be as simple as just adding in the platform name and setting the correct image names, dimensions, etc. Is there more to it than that? If not, I'll happily make the change and put a PR up.

fix jshint errors

Please check these errors:

./lib/io-config.js: line 108, col 11, Confusing use of '!'.
./lib/io-config.js: line 137, col 16, Confusing use of '!'.
./lib/io-config.js: line 156, col 9, Confusing use of '!'.

./lib/serve.js: line 868, col 29, Don't make functions within a loop.

./lib/state.js: line 251, col 30, Don't make functions within a loop.

./lib/stats.js: line 550, col 13, Duplicate key '-s'.
./lib/stats.js: line 637, col 24, Did you mean to return a conditional instead of an assignment?

./spec/upload.spec.js: line 142, col 16, Expected an assignment or function call and instead saw an expression.

Ionic upload command exits with 0 exit code for failed uploads

ionic upload command failed with the following error:

Uploading app....
Saved app_id, writing to ionic.io.bundle.min.js...
An error occurred uploading the build: Error: write EPIPE

but did not exit with non-zero code which led me to believe that the upload was successful. ionic upload is run as one of the commands during a multi-step deploy process, it would be great if it exited with an error code for failed downloads

State.savePlugin fails to write variables if only one is provided.

If a plugin is added with a single variable it will not be properly saved into the package.json file.

For example, if this command is run:

$ ionic plugin add https://github.com/meetfm/com.speedshare.cordova.video.git --variable VIDEOKIT_DIR=/tmp

you will see something like this added to the package.json file:

...
    {
      "locator": "https://github.com/meetfm/com.speedshare.cordova.video.git",
      "id": "com.speedshare.cordova.video",
      "variables": {
        "": ""
      }
    }
...

What is expected is something like this:

...
    {
      "locator": "https://github.com/meetfm/com.speedshare.cordova.video.git",
      "id": "com.speedshare.cordova.video",
      "variables": {
        "VIDEOKIT_DIR": "/tmp"
      }
    }
...

If more than one variable is included then the output is as expected.

Return deploy UUID

I was hoping to use this library to get the UUID of deploys we make with Ionic Deploy. Sadly it only returns the integer version ID, while only the UUID is available from within the app via $ionicDeploy.info().

Use case: I'm integrating Sentry for exception tracking. It allows uploading of your original source files + source maps to give you a readable backtrace of every exception (see here). In order to use this alongside Ionic Deploy, I need the build script to have a unique version string for uploading files, and the app to have the same version string for sending errors.

Semver is not applicable with latest Cordova-CLI dev versions

Hello!

I received this error today after updating Ionic-CLI to v1.6.0:

TypeError: Invalid Version: 5.1.2-dev ([email protected])
    at new SemVer (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\ionic\nod
e_modules\semver\semver.js:295:11)
    at Range.test (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\ionic\nod
e_modules\semver\semver.js:1049:15)
    at Function.satisfies (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\i
onic\node_modules\semver\semver.js:1098:16)
    at Object.checkRuntime (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\
ionic\node_modules\ionic-app-lib\lib\info.js:295:32)
    at Object.run (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\ionic\lib
\cli.js:54:10)
    at Object.<anonymous> (C:\Users\tank-_000\AppData\Roaming\npm\node_modules\i
onic\bin\ionic:9:10)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Invalid Version: 5.1.2-dev ([email protected]) (CLI v1.6.0)
    at ChildProcess.exithandler (child_process.js:751:12)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)

I need to use v5.1.2-dev because of this error: https://issues.apache.org/jira/browse/CB-9212.
I know that the issue lies at Apache for not following the semver specification, so I created an issue at them today. https://issues.apache.org/jira/browse/CB-9290
Hopefully they will agree to the change so these errors can be avoided in the future.

Best regards,
Robin

Removing ionic-platform-web-client should replace commented cordova.js

When you add ionic-platform-web-client via ionic add ionic-platform-web-client, it comments cordova.js and inserts <!-- Cordova is bootstrapped by ionic-platform-web-client, uncomment this if you remove ionic-platform-web-client... -->

While this is an acceptable warning, after removing ionic-platform-web-client via ionic remove ionic-platform-web-client it does not uncomment cordova.js thus you have to find what is going on if you didn't read the warning in your index.html file.

There is code for replacing commented cordova.js while removing ionic.service-deploy here:
io-config.js#Line:329

We can extend this block to replace commented cordova.js while removing ionic-platform-web-client.

ionic resources fails silently

To start: apologies if I am posting this in the wrong place; I'm not sure where else this would go.

I am developing an Ionic app and wanted to use ionic resources to generate the icons. When I would run the command, I would see nothing but "uploading icon.png" and "uploading splash.png", then the script would terminate and nothing would change. I did some digging (and a lot of console.log-ing and traced where the failure was occurring to loadSourceImages() in lib/resources.js.

I added some logging code to the reject function:

// Rest of function truncated
request.post(postData, function(err, httpResponse, body) {
      function reject(msg) {
        try {
          msg += JSON.parse(body).Error;
        } catch (e) {
          msg += body || '';
        }
        console.log('Error: ', err)
        console.log('Response: ', httpResponse);
        console.log(msg);
        deferred.reject(msg);
      }
// etc

And got this (apologies in advance, it is the entire httpResponse):

err:  null
httpResponse:  IncomingMessage {
  _readableState: 
   ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: [],
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: true,
     ended: true,
     endEmitted: true,
     reading: false,
     sync: true,
     needReadable: false,
     emittedReadable: false,
     readableListening: false,
     defaultEncoding: 'utf8',
     ranOut: false,
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null,
     resumeScheduled: false },
  readable: false,
  domain: null,
  _events: 
   { end: [ [Function: responseOnEnd], [Function], [Function], [Function] ],
     close: [ [Function], [Function] ],
     data: [Function],
     error: [Function] },
  _eventsCount: 4,
  _maxListeners: undefined,
  socket: 
   Socket {
     _connecting: false,
     _hadError: false,
     _handle: null,
     _parent: null,
     _host: 'res.ionic.io',
     _readableState: 
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: true,
        ended: false,
        endEmitted: false,
        reading: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: false,
        defaultEncoding: 'utf8',
        ranOut: false,
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null,
        resumeScheduled: false },
     readable: false,
     domain: null,
     _events: 
      { end: [Object],
        finish: [Function: onSocketFinish],
        _socketEnd: [Function: onSocketEnd],
        free: [Function: onFree],
        close: [Object],
        agentRemove: [Function: onRemove],
        drain: [Function: ondrain],
        error: [Object] },
     _eventsCount: 8,
     _maxListeners: 0,
     _writableState: 
      WritableState {
        objectMode: false,
        highWaterMark: 16384,
        needDrain: false,
        ending: true,
        ended: true,
        finished: true,
        decodeStrings: false,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: false,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: true,
        errorEmitted: false },
     writable: false,
     allowHalfOpen: false,
     destroyed: true,
     bytesRead: 446,
     _bytesDispatched: 179402,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     parser: null,
     _httpMessage: 
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedHeader: [Object],
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Circular],
        connection: [Circular],
        _header: 'POST /api/v1/upload HTTP/1.1\r\nhost: res.ionic.io\r\ncontent-type: multipart/form-data; boundary=--------------------------631543885612979365451996\r\ncontent-length: 179211\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        method: 'POST',
        path: '/api/v1/upload',
        parser: null,
        res: [Circular] },
     read: [Function],
     _consuming: true,
     _idleNext: null,
     _idlePrev: null,
     _idleTimeout: -1 },
  connection: 
   Socket {
     _connecting: false,
     _hadError: false,
     _handle: null,
     _parent: null,
     _host: 'res.ionic.io',
     _readableState: 
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: true,
        ended: false,
        endEmitted: false,
        reading: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: false,
        defaultEncoding: 'utf8',
        ranOut: false,
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null,
        resumeScheduled: false },
     readable: false,
     domain: null,
     _events: 
      { end: [Object],
        finish: [Function: onSocketFinish],
        _socketEnd: [Function: onSocketEnd],
        free: [Function: onFree],
        close: [Object],
        agentRemove: [Function: onRemove],
        drain: [Function: ondrain],
        error: [Object] },
     _eventsCount: 8,
     _maxListeners: 0,
     _writableState: 
      WritableState {
        objectMode: false,
        highWaterMark: 16384,
        needDrain: false,
        ending: true,
        ended: true,
        finished: true,
        decodeStrings: false,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: false,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: true,
        errorEmitted: false },
     writable: false,
     allowHalfOpen: false,
     destroyed: true,
     bytesRead: 446,
     _bytesDispatched: 179402,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     parser: null,
     _httpMessage: 
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedHeader: [Object],
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Circular],
        connection: [Circular],
        _header: 'POST /api/v1/upload HTTP/1.1\r\nhost: res.ionic.io\r\ncontent-type: multipart/form-data; boundary=--------------------------631543885612979365451996\r\ncontent-length: 179211\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        method: 'POST',
        path: '/api/v1/upload',
        parser: null,
        res: [Circular] },
     read: [Function],
     _consuming: true,
     _idleNext: null,
     _idlePrev: null,
     _idleTimeout: -1 },
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: true,
  headers: 
   { date: 'Tue, 29 Dec 2015 19:25:35 GMT',
     'content-type': 'text/plain; charset=utf-8',
     'content-length': '90',
     connection: 'close',
     'set-cookie': [ '__cfduid=d0d063624703b9d9d9fd6385cd77582421451417134; expires=Wed, 28-Dec-16 19:25:34 GMT; path=/; domain=.ionic.io; HttpOnly' ],
     via: '1.1 vegur',
     server: 'cloudflare-nginx',
     'cf-ray': '25c7e4423bd1041e-ORD' },
  rawHeaders: 
   [ 'Date',
     'Tue, 29 Dec 2015 19:25:35 GMT',
     'Content-Type',
     'text/plain; charset=utf-8',
     'Content-Length',
     '90',
     'Connection',
     'close',
     'Set-Cookie',
     '__cfduid=d0d063624703b9d9d9fd6385cd77582421451417134; expires=Wed, 28-Dec-16 19:25:34 GMT; path=/; domain=.ionic.io; HttpOnly',
     'Via',
     '1.1 vegur',
     'Server',
     'cloudflare-nginx',
     'CF-RAY',
     '25c7e4423bd1041e-ORD' ],
  trailers: {},
  rawTrailers: [],
  upgrade: false,
  url: '',
  method: null,
  statusCode: 400,
  statusMessage: 'Bad Request',
  client: 
   Socket {
     _connecting: false,
     _hadError: false,
     _handle: null,
     _parent: null,
     _host: 'res.ionic.io',
     _readableState: 
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: true,
        ended: false,
        endEmitted: false,
        reading: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: false,
        defaultEncoding: 'utf8',
        ranOut: false,
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null,
        resumeScheduled: false },
     readable: false,
     domain: null,
     _events: 
      { end: [Object],
        finish: [Function: onSocketFinish],
        _socketEnd: [Function: onSocketEnd],
        free: [Function: onFree],
        close: [Object],
        agentRemove: [Function: onRemove],
        drain: [Function: ondrain],
        error: [Object] },
     _eventsCount: 8,
     _maxListeners: 0,
     _writableState: 
      WritableState {
        objectMode: false,
        highWaterMark: 16384,
        needDrain: false,
        ending: true,
        ended: true,
        finished: true,
        decodeStrings: false,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: false,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: true,
        errorEmitted: false },
     writable: false,
     allowHalfOpen: false,
     destroyed: true,
     bytesRead: 446,
     _bytesDispatched: 179402,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     parser: null,
     _httpMessage: 
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedHeader: [Object],
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Circular],
        connection: [Circular],
        _header: 'POST /api/v1/upload HTTP/1.1\r\nhost: res.ionic.io\r\ncontent-type: multipart/form-data; boundary=--------------------------631543885612979365451996\r\ncontent-length: 179211\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        method: 'POST',
        path: '/api/v1/upload',
        parser: null,
        res: [Circular] },
     read: [Function],
     _consuming: true,
     _idleNext: null,
     _idlePrev: null,
     _idleTimeout: -1 },
  _consuming: true,
  _dumped: false,
  req: 
   ClientRequest {
     domain: null,
     _events: 
      { socket: [Object],
        response: [Function: bound ],
        error: [Function: bound ],
        drain: [Function] },
     _eventsCount: 4,
     _maxListeners: undefined,
     output: [],
     outputEncodings: [],
     outputCallbacks: [],
     outputSize: 0,
     writable: true,
     _last: true,
     chunkedEncoding: false,
     shouldKeepAlive: false,
     useChunkedEncodingByDefault: true,
     sendDate: false,
     _removedHeader: { 'content-length': false },
     _contentLength: null,
     _hasBody: true,
     _trailer: '',
     finished: true,
     _headerSent: true,
     socket: 
      Socket {
        _connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'res.ionic.io',
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 8,
        _maxListeners: 0,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        destroyed: true,
        bytesRead: 446,
        _bytesDispatched: 179402,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        parser: null,
        _httpMessage: [Circular],
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1 },
     connection: 
      Socket {
        _connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'res.ionic.io',
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 8,
        _maxListeners: 0,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        destroyed: true,
        bytesRead: 446,
        _bytesDispatched: 179402,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        parser: null,
        _httpMessage: [Circular],
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1 },
     _header: 'POST /api/v1/upload HTTP/1.1\r\nhost: res.ionic.io\r\ncontent-type: multipart/form-data; boundary=--------------------------631543885612979365451996\r\ncontent-length: 179211\r\nConnection: close\r\n\r\n',
     _headers: 
      { host: 'res.ionic.io',
        'content-type': 'multipart/form-data; boundary=--------------------------631543885612979365451996',
        'content-length': 179211 },
     _headerNames: 
      { host: 'host',
        'content-type': 'content-type',
        'content-length': 'content-length' },
     _onPendingData: null,
     agent: 
      Agent {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        defaultPort: 80,
        protocol: 'http:',
        options: [Object],
        requests: {},
        sockets: [Object],
        freeSockets: {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256 },
     socketPath: undefined,
     method: 'POST',
     path: '/api/v1/upload',
     parser: null,
     res: [Circular] },
  request: 
   Request {
     domain: null,
     _events: 
      { error: [Object],
        complete: [Function: bound ],
        pipe: [Function],
        end: [Object],
        data: [Function] },
     _eventsCount: 5,
     _maxListeners: undefined,
     callback: [Function],
     uri: 
      Url {
        protocol: 'http:',
        slashes: true,
        auth: null,
        host: 'res.ionic.io',
        port: 80,
        hostname: 'res.ionic.io',
        hash: null,
        search: null,
        query: null,
        pathname: '/api/v1/upload',
        path: '/api/v1/upload',
        href: 'http://res.ionic.io/api/v1/upload' },
     proxy: null,
     formData: { image_id: '8150f4c1', src: [Object] },
     method: 'POST',
     readable: true,
     writable: true,
     explicitMethod: true,
     canTunnel: false,
     headers: 
      { 'content-type': 'multipart/form-data; boundary=--------------------------631543885612979365451996',
        'content-length': 179211 },
     setHeader: [Function],
     hasHeader: [Function],
     getHeader: [Function],
     removeHeader: [Function],
     localAddress: undefined,
     qsLib: { stringify: [Function], parse: [Function] },
     pool: {},
     dests: [],
     __isRequestRequest: true,
     _callback: [Function],
     tunnel: false,
     _redirectsFollowed: 0,
     maxRedirects: 10,
     allowRedirect: [Function],
     followRedirects: true,
     followAllRedirects: false,
     redirects: [],
     setHost: true,
     originalCookieHeader: undefined,
     _disableCookies: true,
     _jar: undefined,
     port: 80,
     host: 'res.ionic.io',
     _form: 
      FormData {
        _overheadLength: 255,
        _valueLength: 8,
        _lengthRetrievers: [Object],
        writable: false,
        readable: true,
        dataSize: 0,
        maxDataSize: 2097152,
        pauseStreams: true,
        _released: true,
        _streams: [],
        _currentStream: null,
        _boundary: '--------------------------631543885612979365451996',
        _events: {},
        _eventsCount: 0 },
     path: '/api/v1/upload',
     httpModule: 
      { IncomingMessage: [Object],
        METHODS: [Object],
        OutgoingMessage: [Object],
        ServerResponse: [Object],
        STATUS_CODES: [Object],
        Agent: [Object],
        globalAgent: [Object],
        ClientRequest: [Object],
        request: [Function],
        get: [Function],
        _connectionListener: [Function: connectionListener],
        Server: [Object],
        createServer: [Function],
        Client: [Function: deprecated],
        createClient: [Function: deprecated] },
     agentClass: { [Function: Agent] super_: [Object], defaultMaxSockets: Infinity },
     agent: 
      Agent {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        defaultPort: 80,
        protocol: 'http:',
        options: [Object],
        requests: {},
        sockets: [Object],
        freeSockets: {},
        keepAliveMsecs: 1000,
        keepAlive: false,
        maxSockets: Infinity,
        maxFreeSockets: 256 },
     ntick: true,
     src: 
      FormData {
        _overheadLength: 255,
        _valueLength: 8,
        _lengthRetrievers: [Object],
        writable: false,
        readable: true,
        dataSize: 0,
        maxDataSize: 2097152,
        pauseStreams: true,
        _released: true,
        _streams: [],
        _currentStream: null,
        _boundary: '--------------------------631543885612979365451996',
        _events: {},
        _eventsCount: 0 },
     _started: true,
     href: 'http://res.ionic.io/api/v1/upload',
     req: 
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedHeader: [Object],
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'POST /api/v1/upload HTTP/1.1\r\nhost: res.ionic.io\r\ncontent-type: multipart/form-data; boundary=--------------------------631543885612979365451996\r\ncontent-length: 179211\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        method: 'POST',
        path: '/api/v1/upload',
        parser: null,
        res: [Circular] },
     response: [Circular],
     originalHost: 'res.ionic.io',
     originalHostHeaderName: 'host',
     _destdata: true,
     _ended: true,
     _callbackCalled: true },
  toJSON: [Function: responseToJSON],
  caseless: 
   Caseless {
     dict: 
      { date: 'Tue, 29 Dec 2015 19:25:35 GMT',
        'content-type': 'text/plain; charset=utf-8',
        'content-length': '90',
        connection: 'close',
        'set-cookie': [Object],
        via: '1.1 vegur',
        server: 'cloudflare-nginx',
        'cf-ray': '25c7e4423bd1041e-ORD' } },
  read: [Function],
  body: '{"Error":"unable to read uploaded image","Width":0,"Height":0,"Type":"png","Vector":false}' }
Invalid upload: unable to read uploaded image

Before the logging, I would just get nothing.

Even with all of that information, I am not sure what to make of it. My file is a perfectly valid 1024x1024 24-bit png image without transparency, and other images of different sizes didn't give me any better results. The promise code is clearly doing what it is supposed to, and yet I still cannot seem to figure out what to do to upload my image.

Again, apologies if I posted this in the wrong place but this seemed like where I thought it should go. Am I doing something wrong, or is there actually an issue here?

Ipad Pro scaling size not supported by transform API

Running ionic resources with updated resources.js to get the ipad pro sizes, the following happens:

generating splash ios Default-Portrait@~ipadpro.png (2048x2732)...
generating splash ios Default-Landscape@~ipadpro.png (2732x2048)...
✗ Invalid transformation: invalid width: 2732

State.savePlugin fails to save variables for standard npm plugin

So after a lot of research, I've found that in state.js
if the plugin is added by id and has variables, the script doesn't save the variables at all.
To test you can run ionic plugin add phonegap-facebook-plugin --variable APP_ID="xxxx" --variable APP_NAME="yyyy".
there are missing tests for this case which is strange.

the scripts checks if it's not local and immediately bypasses any check for variables.
There are strange thing in restore state too,
for example the script checks for wrong tags in the config.xml in order to restore the variables.

function getPluginParameters. After running the restore state command on a correct package.json with facebook plugin variables, it deletes them.

Feature: make `shelljs.config.silent` configurable

Right now several files contain the following line

shelljs.config.silent = true

so that e.g. cordova shell commands run within ionic CLI are silent. This is suboptimal, particularly for debugging; when something does not work as intended or takes lot of time, it's hard to figure out what's going on under the hood.

It should be configurable from ionic CLI by a command line flag; maybe --verbose (which now just adds a little bit of verbosity) or --super-verbose (whatever), if received, should be passed further to the ionic-app-lib and enable output of shelljs to be printed.

In fact, it's a bit tricky, because shelljs.config.silent = true at the beginning of the file means that mere require-ing of that file changes this global setting for the whole environment of the current program, hence if I change it in one place, then require some other file, it may change it back to previous value .

The solution must take this into account, and also, there's a silent flag passed directly to some shelljs commands as well. Ideally, all those commands / flag should take true or false from a single source of truth. The cleanest solution would be probably to not use global shelljs.config.silent = ... but pass the silent flag explicitly to each shelljs command.

edit: added some more explanations

Mac OS X version name being reported incorrectly

Discovered this while attempting to do an ionic info: my OS X 10.10 (Yosemite) system was being reported as 'El Capitan' because the Darwin version wasn't being matched exactly. Have submitted a PR #78 that should fix the problem.

ionic state save doesn't preserve plugin branches

Running the ionic state save command doesn't preserve the branch/commit specified by a plugin (added the branch suffix manually).

For example if my package.json looks like this before running the ionic state save:

"cordovaPlugins": [
    "cordova-plugin-device",
    {
      "locator": "https://github.com/djonesdev/CordovaCameraPreview#djonesdev",
      "id": "cordova-plugin-camera-preview"
    }
  ],

The ionic state restore command correctly restores the selected branch (in this case djonesdev).
However after running ionic state save it reverts to this:

"cordovaPlugins": [
    "cordova-plugin-device",
    {
      "locator": "https://github.com/djonesdev/CordovaCameraPreview",
      "id": "cordova-plugin-camera-preview"
    }
  ],

lib/start.js - buffer size exceeded on OSX

After updating to latest ionic CLI, some users on OSX (at least) seem to fail to create new projects.
ionic start projectname --v2
fails with
Unable to run exec commandError: stderr maxBuffer exceeded (CLI v2.0.0-beta.17)

The default value of maxBuffer in Node.js is 200KB.

Going through the code at CLI, the actual buffer size problem can be tracked back to ionic-app-lib/lib/start.js

At Start.runExecCommand, the childProcess.exec fills the buffer.

Testing with pumping up the buffer size:
childProcess.exec(command, {maxBuffer: 10240 * 500}, function(err, stdout, stderr) {
resolves this, and ionic start works again. For some reason, my first try at 1024 * 500 was not enough, had to be larger - then tested with the very large value of 10240 * 500 with success...
Quick fix is to pump up the buffer size, but maybe use spawn instead of exec, if this child process potentially returns a lot of data?

More discussion:
https://forum.ionicframework.com/t/ionic-v2-error-message-when-creating-project/42020/2

[v2] - Adjust transpile.js default webpack.config

Currently, the ionic-cli uses a default webpack config if there is no webpack.config.js file in the users ionic directory.

That default config should be updated to have the platform safe include paths on the loaders objects.

The problem is on mac, the path /www/app/app.js works fine, but on windows, those are not proper path separators. (Same on module.loaders.include paths).

The webpack.config.js that works on windows and mac uses the path module to resolve the paths correctly. Currently using this config.

We will need this same path fix for the default. However, while using the default, we will need to include the users app directory.

Adjust the default transpile webpack config file to include the users paths in the module.

download error with phonegap app

"ionic serve" together with the phonegap developer app ( http://app.phonegap.com/ ) is not working anymore on android and ios for me. i'm using the newest app and cli versions:

Cordova CLI: 5.0.0
Ionic CLI Version: 1.5.5
Ionic App Lib Version: 0.2.5
OS: Windows 7 SP1
Node Version: v0.10.33

i have also installed the latest phonegap desktop app und phonegap cli with the version "5.0.0-0.28.1".

The app shows "Download Error" and a popup with "unable to download archive from the server".

in the ionic forum:
http://forum.ionicframework.com/t/ionic-serve-download-error-with-phonegap-app/27129

setup.spec and package.spec tests failing (Windows and Ubuntu)

I had the same failures both on Windows and Ubuntu, both on Node 0.12.10 and 4.3.1

(in addition to the ones reported on #32)

Are they working fine for you?

Failures:                                                                                                              

  1) Package should get 202 and message from package service                                                           
   Message:                                                                                                            
     Expected 'this' to be 'TypeError: Cannot read property 'noresources' of undefined                                 
    at c:\git\ionic-app-lib\lib\package.js:207:25                                                                      
    at _fulfilled (c:\git\ionic-app-lib\node_modules\q\q.js:787:54)                                                    
    at self.promiseDispatch.done (c:\git\ionic-app-lib\node_modules\q\q.js:816:30)                                     
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:749:13)                               
    at c:\git\ionic-app-lib\node_modules\q\q.js:557:44                                                                 
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)                                                         
    at process._tickCallback (node.js:355:11)'.                                                                        
   Stacktrace:                                                                                                         
     Error: Expected 'this' to be 'TypeError: Cannot read property 'noresources' of undefined                          
    at c:\git\ionic-app-lib\lib\package.js:207:25                                                                      
    at _fulfilled (c:\git\ionic-app-lib\node_modules\q\q.js:787:54)                                                    
    at self.promiseDispatch.done (c:\git\ionic-app-lib\node_modules\q\q.js:816:30)                                     
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:749:13)                               
    at c:\git\ionic-app-lib\node_modules\q\q.js:557:44                                                                 
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)                                                         
    at process._tickCallback (node.js:355:11)'.                                                                        
    at c:\git\ionic-app-lib\spec\package.spec.js:96:24                                                                 
    at _rejected (c:\git\ionic-app-lib\node_modules\q\q.js:797:24)                                                     
    at c:\git\ionic-app-lib\node_modules\q\q.js:823:30                                                                 
    at Promise.when (c:\git\ionic-app-lib\node_modules\q\q.js:1035:31)                                                 
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:741:41)                               
    at c:\git\ionic-app-lib\node_modules\q\q.js:557:44                                                                 
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)                                                         
    at process._tickCallback (node.js:355:11)                                                                          

...

  3) Setup should set up sass correctly
   Message:
     Expected spy npmInstall to have been called with [ '/some/ionic/app' ] but it was never called.
   Stacktrace:
     Error: Expected spy npmInstall to have been called with [ '/some/ionic/app' ] but it was never called.
    at c:\git\ionic-app-lib\spec\setup.spec.js:25:32
    at _fulfilled (c:\git\ionic-app-lib\node_modules\q\q.js:787:54)
    at self.promiseDispatch.done (c:\git\ionic-app-lib\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:749:13)
    at c:\git\ionic-app-lib\node_modules\q\q.js:509:49
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:355:11)

  4) Setup should set up sass correctly
   Message:
     Expected spy modifyIndexFile to have been called with [ '/some/ionic/app' ] but it was never called.
   Stacktrace:
     Error: Expected spy modifyIndexFile to have been called with [ '/some/ionic/app' ] but it was never called.
    at c:\git\ionic-app-lib\spec\setup.spec.js:26:37
    at _fulfilled (c:\git\ionic-app-lib\node_modules\q\q.js:787:54)
    at self.promiseDispatch.done (c:\git\ionic-app-lib\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:749:13)
    at c:\git\ionic-app-lib\node_modules\q\q.js:509:49
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:355:11)

  5) Setup should set up sass correctly
   Message:
     Expected spy buildSass to have been called with [ '/some/ionic/app' ] but it was never called.
   Stacktrace:
     Error: Expected spy buildSass to have been called with [ '/some/ionic/app' ] but it was never called.
    at c:\git\ionic-app-lib\spec\setup.spec.js:27:31
    at _fulfilled (c:\git\ionic-app-lib\node_modules\q\q.js:787:54)
    at self.promiseDispatch.done (c:\git\ionic-app-lib\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (c:\git\ionic-app-lib\node_modules\q\q.js:749:13)
    at c:\git\ionic-app-lib\node_modules\q\q.js:509:49
    at flush (c:\git\ionic-app-lib\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:355:11)

Multiple viable address crash ionic-app-lib that is used by ionic

In our environment we use VPN to access some services and because of that there multiple viable IP addressed and ionic-app-lib crashes at line 914:

logging.logger.info('\nMultiple addresses available.'.error.bold);

And the exception thrown is:

Error getting IPv4 address: TypeError: Cannot read property 'bold' of undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.