Ivan  Wu
Ivan Wu

Reputation: 21

BlankCordovaApp1 build error

I installed visual studio 2013 community edition, and created a "JavaScript -> Apache Cordova Apps" named BlankCordovaApp1 using template, and didn't change any code.

When I build for Device|Debug|Android, Output window shows: (I also tried to build for other platform, got same error.)

1>------ Build started: Project: BlankCordovaApp1, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1>  GeneratedJavascript=
1>  c:\BlankCordovaApp1\BlankCordovaApp1>call "C:\Program Files (x86)\nodejs\"\nodevars.bat 
1>  Your environment has been set up for using Node.js 0.12.0 (x64) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\5QZQI2Q0.RU2\packages\vs-mda
1>  ------ Name from source package.json: vs-mda
1>  ------ Version from source package.json: 0.1.70
1>  ------ Current globally installed version: 0.1.70
1>  ------ Package already installed globally at correct version.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I didn't see any error but a warning, and Chrome also didn't show any project page.

My environment: Windows 7 Enterprise, Service Pack 1 Visual Studio 2013 Community Edition, Update 4 Visual Studio Tools for Apache Cordova CTP3 Chrome 40.0.2214.115 m

Upvotes: 1

Views: 1060

Answers (2)

Rafael Merlin
Rafael Merlin

Reputation: 2767

I was able to solve my problem this way:

First I had to go to Tools, Options, Projects and Solutions, Build and Run and changed MsBuild project build output to Detailed.

After that I went to Cordova Tools (still inside options) and cleared the cache.

When I tried to build my project again I was able to check a massive output showing the errors, I read through most of it and there was an alert telling me that npm couldn't connect to the internet, probably because of the company proxy.

Since I don't need to set my proxy or its password I tried only to disable SSL on npm by doing this:

npm config set registry "http://registry.npmjs.org"
npm config set strict-ssl false

And it worked really well.

Maybe if you need to change your proxy you can try something like this:

npm config set proxy http://my.proxy.com:1234
npm config set https-proxy http://my.proxy.com:1234

I hope it helps.

EDIT: When I tried to download plugins I couldn't so I had to add my proxy using the above lines and them it all worked (both the running the app + the plugin downloading).

Upvotes: 1

Herman Kan
Herman Kan

Reputation: 2292

Update VS Tools for Cordova to the latest version (0.3.2 as of today), and you will see the error in the Output or Error List window.

Otherwise go to %APPDATA%\npm\node_modules\vs-mda and edit vs-cli.cmd as follows:

node "%~dp0\app.js" %* > vs-mda.log 2> vs-mda-err.log

This will dump build logs to these files in your project folder.

Upvotes: 1

Related Questions