Install version cordova-ios 4.3.0 for visual studio and issue with cordova command not existing in CLI - ios

Someone has asked the exact question I need on this page.
However, as I am new, my rep will not allow me to comment yet! So I have had to create a new question.
A guy in the question linked above suggests to "Type cordova platform add ios;". So there I suppose is where my question is different.
When I type Cordova in cmd prompt, I get a message saying "cordova is not recognized as an internal or external command, operable program or batch file."
Update: Please note, I have followed these steps: http://cordova.apache.org/docs/en/7.x/guide/cli/ And I am able to run the npm commands in CLI. I was hoping to simply update my ios version only.
I have also looked up PATH but I have no idea where to start, problem is, people suggest that I shouldn't need to adjust PATH as running the CLI commands to install the Cordova CLI should just allow me to use it?
So to summarize:
I downloaded the node.js and installed it
I typed this into cmd "npm install -g cordova" which installed
I type "cordova" and get my "cordova is not recognized as an internal or external command" message above
My aim is to upgrade my cordova-ios 4.2.0 to cordova-ios 4.3.0 to fix my main error of "remote build requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3"
Update 2 9th oct 2017:
I have given up for now with the above, to work around this i installed Node.js 8.6.0 then updated cordova using npm... im now facing some more issues that I am again stuck on and will create a new question.
Hopefully in the meantime, someone can answer this question and i can try again.
I suspect my issues could be relating to the fact i installed VS 2017 and used all the built in nuget packages (for cordova and node.js) and they are conflicting with the manual way in some way (i suspect that, as running the "cordova" command on my other PC worked fine!)

Related

Buildozer not using correct kivy version when packaging for android

I am having a couple of problems packaging my Kivy app for android which may, or may not be related:
The only packages my app imports other than Kivy, are the time, and math modules. When I add either or both of them to the requirements in the buildozer spec file, I get a "pip._internal.exceptions.DistributionNotFound: No matching distribution for time." error. When I don't include them in my requirements, the build is successful, but crashes upon open with the error:
"Exception: The version of Kivy installed on this system is too old. (You have 1.11.1, but the application requires 2.0.0)"
I am doing the install in a VirutalBox on Ubuntu, and have followed the installation procedure outlined in the Kivy, and Buildozer documentation, as well as following a tutorial by Eric Sandberg on YouTube. I have set the Kivy version in the buildozer spec file, and installed Kivy 2.0.0 on the VM using pip. When I pip freeze, it shows the correct version of Kivy. One thing I have noticed is the when I try and install it with "apt-get install python3-kivy", it says kivy 1.10 is installed and that this is the most up to date version.
This seems like an easy problem to address but I have cannot figure out why it is trying to use this version of Kivy! Please let me know if any other information is required to debug. The spec file is hardly changed, other then specifying Kivy=2.0.0 in requirements.
Here are the logs:
Here are the requirements:
You don't have to add math and time in requirements of your buildozer.spec file as they are inbuild modules in python. So, they will automatically get added when you add python3 in your requirements.
To use a newer versio version of kivy you have to specify it in your requirements. In requirements you have to add like requirements=python3,kivy==2.0.0rc4 or any other version you want to use. Also, after changing requirements you might have to rebuild you package. You have to delete .buildozer directory and again run the buildozer using buildozer android debug deploy run

Use Android Studio 2.2 CMake support with command line SDK

We recently decided to use Android Studio's CMake support as a part of our development, and as far as compiling and building is concerned everything works fine for the development team.
As a part of our validation efforts we are also running Jenkins for continuous testing, and that's where the problems are starting. The machine running Jenkins does not have Android Studio installed, nor it has an UI. As such it only possesses the android NDK and SDK. However, when running tests, the following error occurs :
Failed to find CMake.
Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake.
Expected CMake executable at /home/vagrant/android-sdk-linux/cmake/bin/cmake.
The problem now is that there is no way to install CMake like suggested ! The machine does not have any UI to run Android Studio, and the command line tools feature no option to install CMake. And creating sym-links isn't the solution either, as CMake isn't the only thing it's looking for.
How am I supposed to make my project work on the machine ? CMake is running perfectly (as it was already used as part of the tests) so the problem is only coming from Gradle looking only in the SDK directory for it...
The problem now is that there is no way to install CMake like suggested
Actually it is not! Instead of using android list sdk command for installing sdk packages you should use new command line tool: sdk-manager.
Ndk, cmake are available for installing through this new android sdk tool.
you need to install manually cmake on your system unix:
go to your android sdk directory ${ANDROID_HOME} and create new cmake folder with:
wget "https://dl.google.com/android/repository/cmake-3.6.3155560-linux-x86_64.zip"
unzip -q cmake-3.6.3155560-linux-x86_64.zip -d ${ANDROID_HOME}/cmake
add to PATH ENV ${PATH}:${ANDROID_HOME}/cmake/bin

ASP.NET 5 and Yeoman genetaror issue

First of all I looked into [this][1] post for possible workaround but unfortunately there is none.
My issue is somewhat closer but steps I went through are different so I decided to put up my question in a new thread.
My requirements were:
Installing ASP.NET 5 but I did not want to install full VS 2015 rather I went for DNVM (Dot Net Version Manager) and DNX (NET Execution Environment). This post says we can install from Command Line tool so I used this.
Installing Code for Visual Studio which I did
Installing a aspnet-generator using yo which I did using the following command: npm install -g yo generator-aspnet but ended up with some error messages. Please see screenshot below:
Even I got above errors I went on and ran yo aspnet which was supposed to give me choice of what type of application I want to create etc. But here I ended up with errors again. Please see screenshot below:
I googled a lot but nothing looked suitable or closer to my issue. I don't want to play with Windows Registry.
I am completely screwed up with this problem :( Somebody please show me the right path and help me out of this stand-still situation.
Thank you
This is unfortunately a bug with npm. Here is the usual troubleshoot:
Make sure you're on the latest npm version
Delete the node_modules folders and retry installation
If this doesn't fix it, then you should open an issue on the npm bug tracker.

Visual Studio iOS deployment fails because "The edge module has not been pre-compiled"

I am trying to deploy a HTML/CSS/JS Apache Cordova application from a windows machine to a Mac. I believe they are communicating properly through the remotebuild agent but when I attempt to build a blank project to deploy on the Mac this error is thrown at the very beginning of the build:
MDAVSCLI : error : The edge module has not been pre-compiled for node.js version v4.1.1. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.
I have followed the link and have searched for the solution as to how to fix this error but the link does not seem to apply to what I am doing at all. I am not using any node.js functions in my code so I am confused as to why this error is occuring. I am only trying to build a nearly blank HTML page and I still get the error regardless of how simple I make the page.
How can I go about fixing this solution? what is the best way to get rid of this error or to as the error suggests pre-compile edge to work with node.js version 4.1.1?
There is an issue with Cordova 5.3.1 and Node v4.
https://github.com/Microsoft/cordova-docs/blob/master/articles/known-issues/known-issues-ios.md#building-for-ios-hangs-when-nodejs-v40-is-installed
I fixed by uninstalling Node v4.1.1 and installing Node v0.12.7
https://nodejs.org/en/download/releases/
#Dustin,
you have a misconception about how Cordova works. You say you want to deploy to a Mac, but I think you mean iOS. If so, you should read:
What's needed for iOS Development?
https://groups.google.com/forum/?fromgroups=#!topic/phonegap/bf1Hgkel3W4
I Quote
The short and sweet of it is as follows:
You need OS X + Xcode
You need several iDevices
You need $99/year for Apple Developer program (which you've already indicated is not a problem)
All of the above = cost-of-doing-business.
If you read the entire thread (especially the part from Kerri Shotz), you will get more information and more options.
Best of Luck
After losing a fair bit of hope and following a lot of posts, blogs and bug work-arounds with no luck I decided to click on the 'Run Dependency Checker' button in Visual Studio - Tools -> Options -> Tools For Apache Cordova -> Cordov Tools. This checker told me that Joyent Node.js wast installed. I did have node.js and npm set up on the latest version, im not sure what the difference is.
I went through the process of modifying the VS installation (change or remove a program) and sure enough Joyent Node.js wasnt checked. I cheked it and it went through the process of installing.
My VS installation now looks like the below and my project is building without:
MDAVSCLI : error : The edge module has not been pre-compiled for node.js version v4.1.1

Visual Studio 2015 RTM Cordova IOS Build Error - Could not find module 'Q'

I am using Visual Studio 2015 RTM, and I am working on a Cordova project. My project works fine for Android, but I cannot get it to build for IOS. I have figured out what the problem is, but I cannot figure out how to fix it.
When I build for IOS it is sending the build to the remote build agent installed on my Mac computer, but it is returning the following error:
Could not find module 'Q'. Please Go to Tools --> Options --> Tools
for Apache cordova --> Cordova Tools --> Clear Cordova Cache and try
building again.
Following it's suggestion and clearing the Cordova cache does not help. I did some research and have found that it is a bug in the cordova_ios library. Here is a link to the commit that fixed the error https://github.com/apache/cordova-ios/commit/ed272032878959c90eb28ccc1490e96fb7b69287.
Basically what the issue is that the check_reqs.js file is require 'Q' (uppercase) instead of 'q' (lowercase).
I can work around the problem (and confirm that this is the problem) by doing the following:
Copy my Cordova project over to my Mac computer.
At the command line add IOS as a Cordova platform.
Go to the /platforms/ios/cordova/lib/check_reqs.js file and change line 25 to be a lowercase 'q'.
Build and run the project on the Mac.
What I don't know is how to fix this in Visual Studio so I can build from Visual Studio? I have tried doing NPM updates on the computer that Visual Studio is installed on, but that has not fixed it. I have also tried to manually add the IOS platform to my project via the Cordova command line, and then changing the same file that I change on the Mac, but that does not fix it either.
It looks like this issue if fixed in the latest version of the cordova_ios library, I just cannot figure out how to get Visual Studio and/or the remote build agent on my Mac to use the latest version of the cordova_ios library.
Update
It looks like this is a bug that other people are seeing with Cordova. There are discussion about it here and here. I can reproduce this on my Mac computer. If I create a new Cordova project and add the iOS platform and try to build it for iOS I receive this error. I can then correct the issue by opening the check_reqs.js file and changing the uppercase 'Q' to a lowercase 'q'. However when I build from Visual Studio it sends the project across to the Mac with the incorrect check_req.js file and the build fails. I cannot figure out how to correct this issue when doing a iOS build from Visual Studio.
If your OSX machine has case a case sensitive filesystem you can hit this though a fix is in the works. (Most people do not turn on case sensativity.)
The fix you reference has not yet been released publicly. You can watch for a "platform" release here: http://cordova.apache.org/
Once the platform is released it is very likely a Cordova CLI update will also occur (ex: 5.1.2) so you can just update to that version via the config designer.
However, as an alternative you can add the following into your config.xml file to cause Cordova to use a different iOS platform version and then do a "clean" in VS to force it to take effect:
<engine name="ios" spec="3.9.0" />
3.8.0 is the currently released version.
A "DISCUSS" thread is already going for an iOS release - it should be out in the next couple of weeks.
You can try using the Git URI to get edge - but that could be buggy so exercise care:
<engine name="ios" spec="https://github.com/apache/cordova-ios.git" />
I think we should simply do a patch release of Cordova with this bug fix. Will start a thread on the mailing list to see if a quick release is possible.
Did you already try re-installing vs-tac? Here's the doc:
https://msdn.microsoft.com/library/dn771551(v=vs.140).aspx#vstac
What version of node do you have installed on the MAC machine? I have 0.12.2 and the require(Q) gets satisfied without any errors. Can you try installing a newer version of Node? Let me know.

Resources