Ionic package error


#1

I have an existing ionic app I’ve been developing locally, which I now want to start using with Ionic Cloud (for build/packaging and push notifications). I created the app in my ionic account, but I’m having trouble from the CLI.

Below is the command and error I’m getting. I tried from my macbook, and got the same error. Perhaps a syntax in one of my local files? I’ve already tried npm uninstall/install of ionic, with no change.

C:\aba\abapi>ionic package build android --profile abapi_dev
An error occurred uploading the build: SyntaxError: Unexpected token <

SyntaxError: Unexpected token <
    at Object.parse (native)
    at IncomingMessage.<anonymous> (C:\Users\MYUSER\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\upload.js:301:25)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:921:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)


Unexpected token < (CLI v2.1.12)

I also tried this, and got the following error:

C:\aba\abapi>ionic package list
Body:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Ionic makes it incredibly easy to build beautiful and interactive mobile apps using HTML5 and AngularJS.">
    <meta name="keywords" content="html5,javascript,mobile,drifty,ionic,hybrid,phonegap,cordova,native,ios,android,angularjs">
    <meta name="author" content="Drifty">
    <meta property="og:image" content="http://ionicframework.com/img/ionic-logo-blog.png"/>

    <link rel="shortcut icon" href="https://ionic-apps.s3.amazonaws.com/img/favicon.png">

    <title>404 Not Found! - Ionic.io: the hybrid app platform.</title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

      <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-resource.min.js"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-animate.min.js"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-cookies.min.js"></script>
      <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-animate.min.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.13/angular-ui-router.min.js"></script>
      <script type="text/javascript" src="//api.filepicker.io/v1/filepicker.js"></script>
      <script>
      filepicker.setKey("AabgSObTT8yIzUSh8zMNAz");
      </script>


    <link rel="stylesheet" href="https://ionic-apps.s3.amazonaws.com/CACHE/css/4700a3be5f99.css" type="text/css" media="screen" />



  </head>

  <body class="body-default" ng-app="projects">


        <header class="clearfix navbar header-dash">

          <div class="navbar-header">
            <button type="button"
                    class="navbar-toggle collapsed"
                    data-toggle="collapse"
                    data-target="#navbar-collapse"
                    aria-expanded="false">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">
              <img src="https://ionic-apps.s3.amazonaws.com/img/ionic-cloud-logo-header.png" class="logo">
            </a>
          </div>


          <div class="search" ng-controller="SearchCtrl">
            <div class="form-group" ng-class="{active: searchFocused}">
              <input id="header-search"
                     ng-model="searchQuery"
                     ng-change="doSearch()"
                     type="text"
                     name="search"
                     placeholder="Search my apps"
                     class="form-control"
                     ng-keydown="downUp($event)"
                     ng-focus="searchFocused = true; active = -1; showable = true"
                     ng-blur="searchFocused = false; showable = false">


              <ul id="search-results"
                  ng-class="{shown: searchQuery.length && showable }">
                <li ng-repeat="result in searchResults">
                  <a ng-href="/app/{{result.app_id}}"
                     ng-class="{active: active == $index}">
                    <div class="app-icon">
                      <img ng-src="/icon/{{result.app_id}}" />
                      <div class="mask"></div>
                    </div>
                    <strong ng-bind="result.name"></strong>
                    <span ng-bind="result.app_id"></span>
                  </a>
                </li>
              </ul>

            </div>
          </div>

          <ul class="nav navbar-nav navbar-right">

            <li ><a href="/apps"
              >Dashboard</a></li>
            <li><a href="http://docs.ionic.io/">Docs</a></li>
            <li><a target="_blank" href="https://ionic.io/support">Support</a></li>
            <li>
              <a class="avatar-container" data-toggle="dropdown">
                <img class="avatar"
                     width="24"
                     height="24"
                     src="https://secure.gravatar.com/avatar/f25af826644b7f30818cb89c6f36d4e8?s=32&amp;d=mm"/>
              </a>
              <ul class="dropdown-menu">
                <li class="user">
                  <img class="avatar"
                       width="24"
                       height="24"
                       src="https://secure.gravatar.com/avatar/f25af826644b7f30818cb89c6f36d4e8?s=32&amp;d=mm"/>
                  <div class="name">Randy Brown</div>
                  <div class="username">abaadmin</div>
                </li>
                <li class="settings"><a href="/settings">Account Settings</a></li>
                <li class="notifications"><a href="/settings/email">
                  Notifications</a></li>
                <li class="logout"><a href="/logout">Log out</a></li>
              </ul>
            </li>
          </ul>
        </header>




<img src="https://ionic-apps.s3.amazonaws.com/img/ionitron-404.png" style="max-width: 800px">

<h2>404: Not in this universe.</h2>
<p>
Your request was received. Unfortunately, we cannot locate that resource in the
current universe.
</p>





    </div>


    <!-- Latest compiled and minified JavaScript -->
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-44023830-22', 'auto');
      ga('send', 'pageview');
    </script>



      <script type="text/javascript" src="https://ionic-apps.s3.amazonaws.com/CACHE/js/f5e2ba9a9e8b.js"></script>
      <script>
        angular.module('projects').constant('CSRF_TOKEN', 'zx5UQ9s8xsxyukKnk56KjiJtdodVFjTc');
      </script>

  </body>
</html>


Error in package service. (CLI v2.1.12)

Your system information:

 ordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.42
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.4.7
Xcode version: Not installed

#2

I was able to get past this by setting the app_id to an empty string in my ionic.config.json file:

{
 "name": "MyIonic2Project", 
"app_id": "", 
"v2": true, 
"typescript": true 
}

Then the ionic cloud commands started working


"SyntaxError: Unexpected end of input" when building with Ionic Cloud