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

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

Related

Building for Android Xamarin ARM in Azure Devops

I've created a quick build definition for a project of mine on Azure DevOps, it's a Xamarin solution. Anyway, I was assuming that once built, I could then get the APK and install it on my phone. But it's not installing, and without knowing what's actually wrong, I'm lead to believe that it may be the build configuration as I can do it fine from my local PC.
I've taken a screenshot of the configuration Xamarin options and the only choice of architecture is x86 or x64... surely I need ARM like I would on my local PC? I see nowhere to select ARM though, how do I do this? Or is this not the issue?
Nick.
I found the cause, I needed to sign the APK, for some reason I kind of expected "unknown sources" to include "Unsigned", but even though I'm using a test cert, it's now installing as expected.

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

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

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

Unable to find ant program

I am an experienced (but retired) Windows software developer, with more years experience than I care to admit, developing in C++, C#, VB and Java. I therefore decided to have a crack at Android development. My development machine is a Windows 7 box. My IDE of choice would be Microsoft Visual Studio but, for now, I am happy doing hand editing and launching tools from the command line.
I started by downloading the Android SDK and various additional items it suggested. I then started working my way through the tutorial at developer.android.com/training/basics/firstapp. Android list targets gave me a couple of choices (Android 4.2.2 and Google APIs:17). I then did Android create project from the command line and that appeared to do its stuff, creating MyFirstApp in my development folder. I then ran Android avd and created an emulator. I also added the android SDK's tools and platform-tools to my path. So far so good.
I fell at the next hurdle. The tutorial told me to change to the root folder of my project and run ant debug. At this point, Windows reports:
'ant' is not recognized as an internal or external command,
operable program or batch file.
I've searched around for ant.exe without success. Did I miss installing something or did I miss a vital step in the set-up? Any advice for this very green newbie would be greatly appreciated.
There is no ant.exe. Only ant.bat. Ant is a Java build tool.
If it comes with the Android SDK, make sure its bin directory is in your PATH environment variable. Otherwise, download it (from [http://ant.apache.org][1]), and follow the installation instructions on the web site.
Normally, simply unzipping it, putting its bin directory in the PATH envieonment variable, and setting a JAVA_HOME environment variable that points to your preferred JDK directory is sufficient.

Resources