我一直在使用带有CTP2.0的visual studio professional 2013构建Cordova混合应用程序,一切都运行良好。然后Visual Studio警告我应该升级到更新4.0和CTP 3.0。升级后,我无法再部署我的应用程序。它构建正常但部署失败。我尝试重新安装VS2013,甚至将我的笔记本电脑重置为出厂设置。
部署时,我在输出窗口中收到以下消息:
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:\Users\Abel Silva\documents\visual studio 2013\Projects\BlankCordovaApp1\BlankCordovaApp
1>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.33 (ia32) 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\TCFZDSVO.K3U\packages\vs-mda
2>------ Deploy started: Project: BlankCordovaApp1, Configuration: Debug Android ------
2>Starting launch process C:\Program Files (x86)\nodejs\node.exe ""C:\Users\Abel Silva\AppData\Roaming\npm\node_modules\vs-mda\emulator.js"" --platform android --path "C:\Users\Abel Silva\documents\visual studio 2013\Projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug" --deployTarget "emulator" --language pt-PT --configuration debug
2>C:\Users\Abel:1
2>function (exports, require, module, __filename, __dirname) { ****************
2> ^
2>SyntaxError: Unexpected token *
2>
2>at Module._compile (module.js:439:25)
2>at Object.Module._extensions..js (module.js:474:10)
2>at Module.load (module.js:356:32)
2>at Function.Module._load (module.js:312:12)
2>at Function.Module.runMain (module.js:497:10)
2>at startup (node.js:119:16)
2>at node.js:906:3
2>C:\Users\Abel:1
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
答案 0 :(得分:1)
似乎由于用户名中的空间(Abel Silva),VS在调用emulator.js用于部署应用程序时添加双引号。尝试使用没有空格的用户名。 “”** C:\ Users \ Abel Silva \ AppData \ Roaming \ npm \ node_modules \ vs-mda \ emulator.js “”**