Giter Site home page Giter Site logo

ionic-cli's People

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  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  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  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  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

ionic-cli's Issues

form-data swallows exceptions

The form-data module used for the upload task will not let the user catch or handle a 404 error (for example). This makes it impossible to return any meaningful error message back to the user.

Handling network errors

If there is a net work error when creating a new project, the message printed out is pretty obscure.

/usr/local/lib/node_modules/ionic/node_modules/progress/lib/node-progress.js:130
complete = Array(Math.round(width * ratio)).join(this.chars.complete);
^
RangeError: Invalid array length
at ProgressBar.render (/usr/local/lib/node_modules/ionic/node_modules/progress/lib/node-progress.js:130:14)
at ProgressBar.tick (/usr/local/lib/node_modules/ionic/node_modules/progress/lib/node-progress.js:86:8)
at IncomingMessage. (/usr/local/lib/node_modules/ionic/lib/ionic.js:546:13)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (stream_readable.js:745:14)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitReadable (_stream_readable.js:407:10)
at emitReadable (_stream_readable.js:403:5)
at readableAddChunk (_stream_readable.js:165:9)
at IncomingMessage.Readable.push (_stream_readable.js:127:10)
Exiting.

Can this be handled with a cleaner, less obscure warning?

Running ionic start <project name> returns EACCES error.

Ubuntu 13.04.
npm 1.3.14
node 0.10.22.

Running ionic start whatever returns:

Running start task...
Creating Ionic app in folder /home/sander/whatever
Downloading starter template from https://github.com/driftyco/ionic-angular-cordova-seed/archive/master.zip

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: EACCES, open '/tmpionic-angular-cordova-seed1386308061693.zip'

Running the command via sudo works, but then have to run everything interacting with it with root.

ionic start... not working on windows 8.1. Says cordova too old

Am not behind a proxy and I was able to do this earlier. Now I upgrade to windows 8.1 and the command below wont work.

ionic start myApp blank

I have updated cordova, re-installed windows and started again. But no change. If there is a workaround someone let me know. Here is my cmd output.

C:\Users\Martin>ionic start myapp blank
Running start task...
Creating Ionic app in folder C:\Users\Martin\myapp based on blank project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-blank/archive/master.zip
Initializing cordova project.
Fetching plugin "org.apache.cordova.device" via plugin registry
Fetching plugin "org.apache.cordova.console" via plugin registry
ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try up
dating (npm install -g cordova), removing this project folder, and trying again.

Exiting.

C:\Users\Martin>

$ionic platform update ?

well an issue that perhaps lands between feature request / bug - just close if I'm on the wrong track here:

with cordova we can do:

$ cd <project app>
$ cordova platform update android

with ionic we currently can do:

$ ionic platform add android
Running platform task...
Adding platform android
...

should we expect to be able to do ?

$ ionic platform update android
Running platform task...
Adding platform update
Platform "update" not recognized as a core cordova platform. See "platform list".
...

Ionic start without Cordova

Might be nice to be able to start an Ionic app without Cordova, if you are building a mobile website or something like that.

Ionic v1.1.8 - Error run android

Sorry for my english, just say, everything worked perfect, until you upgrade to the latest version 1.1.8. I can not try on android

I use command: ionic run android
Now install the platform of cordoa android

Sample image.

error ionic

cli should offer update option for existing projects

This is more a feature request than a bug/issue:

with

npm update -g ionic

one can update the command line.

In case that ionic is under heavy development, it should offer options to update an existing project with new releases of ionic. Today one needs to manually copy files and folders for ionic specific stuff. I think this could be automated and enhance the overall workflow for developing apps with ionic.

CLI command to update the local copies of Ionic

I see a lot of people talking about this on the forum. Mike said to make an issue.
It would be great if we could do:

ionic platform update ios
ionic platform update android

which would mirror the cordova platform command

ionic start don't work

When i try to start a new project i get the following errror:

$ ionic start HybridDemo sideMenu
Running start task...
Creating Ionic app in folder /Users/xxx/Desktop/HybridDemo based on sideMenu project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-sideMenu/archive/master.zip
Initializing cordova project.
Fetching plugin "org.apache.cordova.device" via plugin registry
Error: failed to fetch the plugin archive
    at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/registry/registry.js:60:26
    at Request.cb [as _callback] (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/registry/registry.js:251:9)
    at self.callback (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/request/index.js:148:22)
    at Request.EventEmitter.emit (events.js:117:20)
    at ClientRequest.self.clientErrorHandler (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/request/index.js:257:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1547:9)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:415:13)
ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again.
Exiting.

reproduced on OSX and windows 8. obiuvsly cordova and ionic are up-to date

Hanging on install

Hi,

I am trying to install Ionic and it is hanging on "Fetching repo: https://github.com/driftyco/ionic-app-base/archive/master.zip". It appears to have unzipped the directory but it never seems to progress an further? If I cancel the install and then cd into the directory and to to run npm install it errors with ENOPACKAGEJSON so I'm not sure what is going on:

I have NVM installed and I am using node v0.11.11. Any help would be appreciated.

Thanks

ionic-team/ionic-framework#937

[Mac][ionic platform ios] /bin/sh: cordova: command not found

Hi,

$ node -v
v0.10.22

$ npm -v
1.3.14

I'm on Mac just tried to run demo app according to getting-started, i got an error:

$ ionic platform ios
Running platform task...
Adding platform ios
/bin/sh: cordova: command not found
Unable to add platform ios. Please see console for more info.

So cordova binary here

/usr/local/lib/node_modules/ionic/node_modules/cordova/bin/cordova
/usr/local/lib/node_modules/ionic/node_modules/.bin/cordova

ionic is global:

$ which ionic
/usr/local/bin/ionic

But cordova doesn't:

$ which cordova
cordova not found

Should I install cordova globally as a separate installation?

error when starting new project

hi i just started using ionic via windows 7 x64
when i create new project, with CLI

ionic start myApp

then ionic cannot start
when I run it the CLI returns always this error:

D:\source>ionic start myApp

fs.js:642
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: ENOENT, no such file or directory 'D:\Users\Rasyid\.ionic'
    at Object.fs.mkdirSync (fs.js:642:18)
    at Object.module.exports.save (C:\Users\Rasyid\AppData\Roaming\npm\node_modules\ionic\lib\ionic\config.js:36:10)
    at Object.module.exports.create (C:\Users\Rasyid\AppData\Roaming\npm\node_modules\ionic\lib\ionic\config.js:44:10)
    at Object.module.exports.getConfig (C:\Users\Rasyid\AppData\Roaming\npm\node_modules\ionic\lib\ionic\config.js:15:12)
    at Object.<anonymous> (C:\Users\Rasyid\AppData\Roaming\npm\node_modules\ionic\lib\ionic\stats.js:518:31)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

thx before

Improve code structure

I think we should refactor the cli to use a better more generic command line handling tool. As it stands the code is pretty crappy.

Unavailable command doesn't show error

If I type ionic foobar the start screen (ionic) will be printed.

That's nice but it would be helpful to get some message like this is not a valid command - please try one of this

version numbers ionic-cli vs ionic

when running the cli command ionic it is confusion that it shows 1.1.6 after the ascii-art ionic. Maybe we can indicate both the ionic AND ionic-cli version.

"Platform" command altered since 1.1.5

Since 1.1.5, ionic platform <PLATFORM> does not add platform.
Instead it logs already installed platforms and available ones:

Installed platforms:
Available platforms: amazon-fireos, android, blackberry10, firefoxos, windows8, wp8

Downgrading to 1.1.4: works normally again.

Different versions in npm and master?

The current version of Ionic in npm shows 0.9.16 (2014-02-08T16:44:31.809Z) but on github / the Ionic website I can find version 0.9.23.

If there is a difference, what is it?

Thanks!

project structure of `ionic start` projects has changed in bad way

Hi,

seems like there have been some changes how projects are initialized.

Why this https://github.com/driftyco/ionic-cli/blob/master/lib/ionic/start.js#L168?

I really don't care what name the boilerplate had, I used.
Why force me to have such ugly folder names like ionic-app-base-master - just call it "app" or something.

But where does the "ionic.project" file comes from? What is it for?
Why not put it beside the rest of the app?

Seems ugly this way and forces me to make another cd ugly-folder-name to be able to do some gulp, ionic etc stuff.

This also crashs your documentation as it needs the info to have another cd.

Seems like a mistake and doesn't seems like fun.

Add support for 'cordova plugin add/rm ...' + update feature

Since the Ionic CLI has been moving toward a full Cordova CLI coverage, how about Ionic include the plugin commands? And even extend on the plugin commands, with a pluing update ... feature?

Sure, cordova is simple to use as so:

$ cordova plugin add org.apache.cordova.camera

But for updating a plugin it requires two lines of code:

$ cordova plugin rm org.apache.cordova.camera
$ cordova plugin add org.apache.cordova.camera

The Ionic CLI could extend on this and have two options:

  1. update one plugin at a time
  2. update all plugins in one go

eg:

$ ionic plugin update org.apache.cordova.camera
$ ionic plugin update -all

An update would literally just rm and re- add the plugin, which is syntactically simple, but gives ionic developers a simpler way of dealing with cordova.

If you like this feature I would very much like to help and could create a PR to start off from.

Ionic-starter-tabs Doesn't Run In Chrome

Kicking off via cli using :

  • ionic start myApp tabs

  • cd myApp

  • ionic platform add ios

  • ionic build ios

  • ionic emulate ios

    produces an app that runs properly in the simulator.

However, in Chrome, it produces errors and displays no header.

Additionally, there is an errant swap file in the www directory : "-rw-r--r-- 1 jn staff 12288 Apr 10 09:06 .index.html.swp"

ion-cli-starter-errors

ionic start don't work when invalid HTTPS certificate

I'm behind a proxy server, so have to set PROXY env when launching ionic cli. The command ionic start download a file from GitHub that, in my workplace, has the HTTPS with invalid certificate. In this environment i get the following error:

C:\Users\ggherardi\Temp\ionic>SET PROXY=http://ggherardi:[email protected]:8090
C:\Users\ggherardi\Temp\ionic>node_modules\.bin\ionic start myApp tabs
Running start task...
Creating Ionic app in folder C:\Users\ggherardi\Temp\ionic\myApp based on tabs project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

C:\Users\ggherardi\Temp\ionic\node_modules\ionic\lib\ionic.js:257
      if(res.statusCode !== 200) {
            ^
TypeError: Cannot read property 'statusCode' of undefined
    at Request._callback (C:\Users\ggherardi\Temp\ionic\node_modules\ionic\lib\ionic.js:257:13)
    at self.callback (C:\Users\ggherardi\Temp\ionic\node_modules\ionic\node_modules\request\request.js:129:22)
    at Request.EventEmitter.emit (events.js:95:17)
    at ClientRequest.self.clientErrorHandler (C:\Users\ggherardi\Temp\ionic\node_modules\ionic\node_modules\request\request.js:239:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at CleartextStream.socketErrorListener (http.js:1547:9)
    at CleartextStream.EventEmitter.emit (events.js:95:17)
    at SecurePair.<anonymous> (tls.js:1389:19)
    at SecurePair.EventEmitter.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:982:10)

After a bit of research, seems that the error is related to the invalid HTTPS certificate, in fact the err parameter in the request callback has the following message:

https [Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE]

Any idea on how can i make this working?

After creating new project, `ionic serve` throws error.

I just installed ionic globally via sudo npm install -g ionic and am getting this error after creating a new project, testing in the iOS simulator and then running ionic serve:

/usr/local/share/npm/lib/node_modules/ionic/lib/ionic/serve.js:30
  ionic.latestVersion.promise.then(function(){
                     ^
TypeError: Cannot read property 'promise' of undefined
    at Object.IonicServeTask.run (/usr/local/share/npm/lib/node_modules/ionic/lib/ionic/serve.js:30:22)
    at Object.Ionic.run (/usr/local/share/npm/lib/node_modules/ionic/lib/ionic.js:337:13)
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/ionic/bin/ionic:10:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

ionic --version returns Installed Ionic CLI version: 1.1.3

Starter Projects Not Being Fetched

When I run ionic start myApp tabs/sidemenu I only get the base project.

➜  blist  ionic start blist sidemenu
Running start task...
Creating Ionic app in folder /Users/mhamel/Development/fun/blist/blist based on sidemenu project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip
➜  blist  tree blist/ionic-app-base-master/www/
blist/ionic-app-base-master/www/
├── index.html
├── js
│   └── app.js
└── lib
    └── ionic
        ├── css
        │   ├── ionic.css
        │   └── ionic.min.css
        └── fonts
            ├── ionicons.eot
            └── ionicons.svg

5 directories, 6 files

I also noticed that the ionic.bundle.js doesn't seem to be added either.

Flags are not passed to cordova

I ran into this issue when testing on WP8. The command "ionic run wp8 --device" does not seem to forward the "--device" flag to Cordova.

After looking into ionic/run.js, I can't see any code there to forward the flags. Is this intentional?

If not, the following code fixes this issue.

IonicRunTask.prototype.run = function(ionic) {
  if(argv._.length < 2) {
    IonicRunTask.prototype._printUsage();
    ionic.fail('No platforms specified, exiting.');
  }

  var flags = " ";
  for (var i in argv) {
    if (i !== "_" && i !== "$0") {
        flags += " --" + i;
    }
  }

  var platforms = argv._.slice(1);

  if(platforms.length < 1) {
    ionic.fail('No platforms specified, exiting.');
  }

  IonicStats.t('run', { 'platform': platforms.join(',') });

  for(var i = 0; i < platforms.length; i++) {
    var platform = platforms[i];
    console.log('Running app on platform', platform);
    if(exec("cordova run " + platform + flags).code !== 0) {
      ionic.fail('Unable to run app on platform ' + platform + '. Please see console for more info.');
    }
  }
};

Provide help for users to update

  • bower: requires our windows newer users to install git, so no
  • npm: ionic isn't on npm yet

I think we should just include some documentation telling the users how to update the version of ionic. It's pretty simple.

No such file or directory error on Window7

F:\dev\ionic>ionic start myApp
Unable to save settings file: { [Error: ENOENT, no such file or directory 'F:\Users\IBM_ADMIN.ionic']
errno: 34,
code: 'ENOENT',
path: 'F:\Users\IBM_ADMIN.ionic',
syscall: 'mkdir' }

Add error logging

It'd be nice to know when people are running into issues. Maybe we can add a simple, anonymous error logging system.

Build sass files with node-sass

We could wrap node-sass within the ionic cli to make development easier. Basically have commands like ionic sass and ionic sass --watch (along with hooking it up to ionic serve), and not require developers to install ruby and sass (which ultimately makes development easier for those who haven't done previous projects with sass, and faster in getting the project configured and setup for development). Plus libsass will be much faster to compile.

From there we can modularize our scss even further and setup a process which builds their production CSS file with the bare minimum selectors and properties their app requires. Faster rendering, fewer bytes, no extra configuration on their end, and all with the benefits of sass.

Update sass files

For developers relying on scss for customizing their styles, running ionic lib update does not help. I was under the impression that it would update lib/ionic to the same source we're getting from a bower repository. Instead, it only updates the release folder only. Is there a way to incorporate scss folder and its gulpfile as part of the release folder?

ionic-team/ionic-framework#1936

Upgrade to the latest dist

It would be nice if you provided a command in ionic-cli to upgrade the ionic/dist files to the latest copies from master.

Add platform information into body class

See if we can insert each platform's name into their respective build's index.html body class tag.

For example, an ios build would automatically get this in their body tag:

<body class="platform-ios">

And Android would automatically build with:

<body class="platform-android">

Not necessarily required, but may be a nice to have

Add release option

We could have a release option that removes unnecessary files and strips everything down.

Package installation crashes while trying to resolve dependency: colors@'^0.6.2'

npm error stack:

npm http 304 https://registry.npmjs.org/colors
npm ERR! Error: No compatible version found: colors@'^0.6.2'
npm ERR! Valid install targets:
npm ERR! ["0.3.0","0.5.0","0.5.1","0.6.0","0.6.0-1","0.6.1","0.6.2"]
npm ERR! at installTargetsError (c:\Program Files\nodejs\node_modules\npm\lib\cache.js:685:10)
npm ERR! at c:\Program Files\nodejs\node_modules\npm\lib\cache.js:607:10
npm ERR! at saved (c:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Windows_NT 6.2.9200

Error while trying to start a new project

Hi,

I just used the "start" task to create my first project but when I run it the CLI returns always this error:

C:\Users\...\AppData\Roaming\npm\node_modules\ionic\lib\ionic\stats.js:525
      this.createdId();
           ^
TypeError: Object #<Object> has no method 'createdId'
    at Object.exports.IonicStats.t (C:\Users\...\AppData\Roaming\npm\node_m
odules\ionic\lib\ionic\stats.js:525:12)
    at Object.IonicStartTask._finish (C:\Users\...\AppData\Roaming\npm\node
_modules\ionic\lib\ionic\start.js:107:14)
    at Extract.<anonymous> (C:\Users\...\AppData\Roaming\npm\node_modules\i
onic\lib\ionic\start.js:87:13)
    at Extract.EventEmitter.emit (events.js:117:20)
    at DirWriter.<anonymous> (C:\Users\...\AppData\Roaming\npm\node_modules
\ionic\node_modules\unzip\lib\extract.js:42:10)
    at DirWriter.EventEmitter.emit (events.js:117:20)
    at end (C:\Users\...\AppData\Roaming\npm\node_modules\ionic\node_module
s\unzip\node_modules\fstream\lib\writer.js:323:12)
    at C:\Users\...\AppData\Roaming\npm\node_modules\ionic\node_modules\unz
ip\node_modules\fstream\lib\writer.js:313:32
    at endUtimes (C:\Users\...\AppData\Roaming\npm\node_modules\ionic\node_
modules\unzip\node_modules\fstream\lib\writer.js:216:58)
    at setProps (C:\Users\...\AppData\Roaming\npm\node_modules\ionic\node_m
odules\unzip\node_modules\fstream\lib\writer.js:296:5)

Thanks in advance

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.