在Visual Studio 2013上运行波纹模拟器时出现问题

时间:2022-03-23 18:59:05

I am trying to run the ripple emulator on Visual Studio, however I cannot seem to get pass the cannot find module './lib/plugin'error as follows:

我试图在Visual Studio上运行ripple模拟器,但是我似乎无法通过找不到模块'./lib/plugin'error如下:

C:\Users[user name]\Documents\Visual Studio 2013\Projects\Cordova\Cordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat

C:\ Users [用户名] \ Documents \ Visual Studio 2013 \ Projects \ Cordova \ Cordova>调用“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: E:\PROGRAM FILES (X86)\VISUAL STUDIO\COMMON7\IDE\EXTENSIONS\FUBXMEK2.O2B\packages\vs-mda 1>MDAVSCLI : error : Cannot find module './lib/plugin'

您的环境已设置为使用Node.js 0.10.33(ia32)和npm。 ------确保从源包目录正确全局安装包:E:\ PROGRAM FILES(X86)\ VISUAL STUDIO \ COMMON7 \ IDE \ EXTENSIONS \ FUBXMEK2.O2B \ packages \ vs-mda 1> MDAVSCLI:错误:找不到模块'./lib/plugin'

PS: The previous error I got was cannot find module 'q' however this was resolved by running npm install from CLI.

PS:我之前遇到的错误是找不到模块'q',但是通过从CLI运行npm install解决了这个问题。

I am trying to create a Cordova application using Visual Studio. Any ideas how I can resolve the above error?

我正在尝试使用Visual Studio创建Cordova应用程序。我有什么想法可以解决上述错误?

2 个解决方案

#1


8  

It seems something went wrong while installing vs-mda, you can try following to re-install:

安装vs-mda似乎出了问题,您可以尝试以下重新安装:

  1. Close Visual Studio
  2. 关闭Visual Studio
  3. Open cmd
  4. 打开cmd
  5. npm install -g [path to vs-mda example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda]
  6. npm install -g [vs-mda的路径示例C:\ Users [用户名] \ AppData \ Roaming \ npm \ node_modules \ vs-mda]
  7. npm install -g [path to vs-mda-targets example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda-targets]
  8. npm install -g [vs-mda-targets示例C:\ Users [用户名] \ AppData \ Roaming \ npm \ node_modules \ vs-mda-targets]

OR

要么

  1. Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache 在Visual Studio 2013上运行波纹模拟器时出现问题
  2. 转到工具 - >选项 - > Apache Cordova工具 - > Cordova工具 - >清除Cordova缓存

#2


0  

For the second method above (Clear Cordova Data) try running visual studio as administrator if it fails the first time around.

对于上面的第二种方法(Clear Cordova Data),尝试以第一次失败的方式运行visual studio作为管理员。

#1


8  

It seems something went wrong while installing vs-mda, you can try following to re-install:

安装vs-mda似乎出了问题,您可以尝试以下重新安装:

  1. Close Visual Studio
  2. 关闭Visual Studio
  3. Open cmd
  4. 打开cmd
  5. npm install -g [path to vs-mda example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda]
  6. npm install -g [vs-mda的路径示例C:\ Users [用户名] \ AppData \ Roaming \ npm \ node_modules \ vs-mda]
  7. npm install -g [path to vs-mda-targets example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda-targets]
  8. npm install -g [vs-mda-targets示例C:\ Users [用户名] \ AppData \ Roaming \ npm \ node_modules \ vs-mda-targets]

OR

要么

  1. Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache 在Visual Studio 2013上运行波纹模拟器时出现问题
  2. 转到工具 - >选项 - > Apache Cordova工具 - > Cordova工具 - >清除Cordova缓存

#2


0  

For the second method above (Clear Cordova Data) try running visual studio as administrator if it fails the first time around.

对于上面的第二种方法(Clear Cordova Data),尝试以第一次失败的方式运行visual studio作为管理员。