ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
192 stars 187 forks source link

Problem with possibly lastest CLI & Ionic v1 #326

Closed timothylombrana closed 6 years ago

timothylombrana commented 6 years ago

Short description of the problem:

Latest CLI won't let me build my app so I can run in ios emulator or device. Getting one warning and one error.

Error output from running this command ionic cordova build ios:

        Error: Cordova needs ios-deploy version 1.9.2 or greater, you have version 1.8.4. Please download, build and
        install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install
        -g ios-deploy'

Warn output from running this command ionic build:

What behavior are you expecting?

For it to build and run on my device or in the emulator.

Steps to reproduce:

  1. npm install -g cordova ionic
  2. ionic start myApp tabs(any starter template)
  3. ionic cordova platform add ios
  4. ionic cordova build ios
insert any relevant code between the above and below backticks

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x 1.3.3 Germany

cli packages: (/Users/Tim/.nvm/versions/node/v7.8.0/lib/node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.2

global packages:

cordova (Cordova CLI) : 7.1.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : ios 4.5.2
Ionic Framework   : ionic1 0.9.27

System:

ios-deploy : 1.8.4
ios-sim    : 6.0.0
Node       : v7.8.0
npm        : 4.2.0
OS         : macOS Sierra
Xcode      : Xcode 9.0.1 Build version 9A1004

Misc:

backend : legacy
gerwintown commented 6 years ago

I'm sure you figured this out (hopefully), but it should have been obvious from the error you received and the output of ionic info that your dependencies needed to be updated, namely, ios-deploy. That isn't a bug, it told you exactly what was wrong and told you exactly how to fix it?

Am I confused? Did you update ios-deploy as the error suggested and did that not work?

timothylombrana commented 6 years ago

I did not pursue using v1, while the error is obvious I do believe this is a bug. How does a fresh install give build errors? Why should end users have to update dependencies on a new install? Im confused about how your comment helps this thread.

gerwintown commented 6 years ago

My comment was primarily to provide an answer to an open issue that had been left open and unanswered for several months. My comment helped, at the very least, to get you to close it….

I thought it was possible that you didn’t articulate your issue, as it somewhat resembled an issue I was facing due to conflicts between global and local packages, and npm cache.

But if it is actually this:

Why should end users have to update dependencies on a new install?

For one thing, we are developers, not "end-users,” and its your project. So when you updated the ionic-cli dependency for your project, you needed to also update your other dependencies…

So, why should you not have to update your own dependencies? Do you even realize the fact that ionic-cli is smart enough to tell you what you needed to do makes it a great tool? You confuse a feature request for a bug and basically end up complaining about something you get to use for free..

How does a fresh install give build errors?

You are new and/or entitled else you would never have such an expectation. You appear to not understand what you are doing, which is probably why nobody answered you in 3 months. Have you never read Cordova’s iOS platform guide? What does it say for the second step? Why would you find that on the Cordova website? hmmm....

Why didn’t you know that ios-deploy is a separate package and has always required a separate install? Why is an entire extra step such a ridiculous concept to you? You know this is a build tool for an application framework, not a working application, yes? And do you also know that not every Ionic developer has plans to deploy for iOS, that its not even an option and in fact a waste of space for everybody on linux or windows, yes? And then those that do may still end up using Cordova directly, yes? You know that ios-deploy is a Cordova/Phonegap project, not made by Ionic…. r-right?

Now maybe you could say that it could be part of the ionic platform add ios command (which is a feature request, not a bug report) but being that ionic-cli and ios-deploy are produced by different vendors, and given that they release updates at completely different rates and intervals, why would you even want that? It is better that they are separated because it gives you more control and flexibility as a developer, and allows you to include or exclude, update or revert specific pieces of your application as you wish. It allows you to get the latest ios-deploy without waiting on a new ionic-cli release, or if a bug is found in the latest ios-deploy you only need to revert that module and not your entire project..

What if you are maintaining a legacy Ionic V1 project in 2 years, when the Ionic CLI no longer supports V1 Framework at all, and you simply want to keep up with iOS versions? You don’t even need the ionic cli at all, it is just a developer tool. You want to be limited to the version of ios-deploy last supported by a 1 year old CLI tool, or do you want it to be independent?

Anyway, I understand that the docs can be confusing and you have to go to too many disconnected places for information (migration guides, changelogs, cordova, plugin docs, etc, etc), but for this issue, that wasn’t the problem….

timothylombrana commented 6 years ago

End user...developer kinda the same thing. Your whole dogmatic take on the nomenclature, well it's exhausting. Was just trying to get some help, not some jerk to point out things I obviously did wrong and couldn't figure out on my own(insert self deprecating joke here). But none the less thanks, and at least I got you to explain more how the CLI works for future devs that may come looking.