'MySQL' is not recognized as an internal command (Apache Cordova for visual studio)

只谈情不闲聊 提交于 2020-01-11 01:48:13

问题


When i'm building an Blank App in visual studio with Cordova Apache Tools, i got this error:

'MySQL' is not recognized as an internal command.

------ Build started: Project: FirstAppInCordova, Configuration: Debug Android ------

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

C:\Users\Douglas\documents\visual studio 2013\Projects\FirstAppInCordova\FirstAppInCordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat 

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : 'MySQL' n�o � reconhecido como um comando interno

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ou externo, um programa oper�vel ou um arquivo em lotes.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : 'MySQL' n�o � reconhecido como um comando interno

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ou externo, um programa oper�vel ou um arquivo em lotes.

 Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.

Android Emulator is running on AVD Control.

UPDATE I fixed it by add in the system variable the bin folder of mysql server, now the output log just return:

------ Build started: Project: FirstAppInCordova, Configuration: Debug Android ------

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.

  GeneratedJavascript=
  C:\Users\Douglas\documents\visual studio 2013\Projects\FirstAppInCordova\FirstAppInCordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat 

  Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.

  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\1DKIFLHP.GW1\packages\vs-mda

回答1:


This looks like it occurs when you already have mySql installed on the box.

I fixed by adding quotes around the following MySql items in the path. Be sure and restart VS once you've made the path changes.

...;"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5"\;"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\Doctrine extensions for PHP\";...

I also added a user with the name of ODBC to mySql with a blank password... prolly not wise, but this is my personal dev box.




回答2:


I've solved by removing doing what Jim says and also removing C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda\node_modules\*.* and C:\Users\Miquel\AppData\Roaming\npm-cache\*.*

Then in cmd I went to C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda and ran:

npm install


来源:https://stackoverflow.com/questions/27366873/mysql-is-not-recognized-as-an-internal-command-apache-cordova-for-visual-stud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!