Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

lib/start.js - buffer size exceeded on OSX #77

Closed

Description

@mikkokam

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

Activity

  1. tlancina commented on Apr 4, 2016

    @tlancina
    Contributor

    Switched to spawn in the latest beta, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions