问题描述
我试图在Visual Studio上运行波纹仿真器,但我似乎无法通过无法找到模块'./lib/plugin'error 如下:
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:
C:\Users [user name] \Documents\Visual Studio 2013\Projects\Cordova\Cordova> callC:\Program Files(x86)\\\
odejs \\\\
odevars.bat
C:\Users[user name]\Documents\Visual Studio 2013\Projects\Cordova\Cordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
您的环境已设置为使用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
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-mda1>MDAVSCLI : error : Cannot find module './lib/plugin'
PS:我得到的是无法找到模块'q',但这是通过从CLI运行npm install解决。
PS: The previous error I got was cannot find module 'q' however this was resolved by running npm install from CLI.
我试图使用Visual Studio创建Cordova应用程序。任何想法如何解决上述错误?
I am trying to create a Cordova application using Visual Studio. Any ideas how I can resolve the above error?
推荐答案
安装vs-mda时出现问题,重新安装:
It seems something went wrong while installing vs-mda, you can try following to re-install:
- 关闭Visual Studio
- 打开cmd
- npm install -g [vs-mda路径示例C:\Users [user-name] \AppData\Roaming\\\
pm\\\
ode_modules\vs-mda] - npm install -g [vs-mda-targets路径示例C:\Users [user-name] \AppData\Roaming\\\
pm\\\
ode_modules\vs-mda-targets]
- Close Visual Studio
- Open cmd
- npm install -g [path to vs-mda example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda]
- npm install -g [path to vs-mda-targets example C:\Users[user-name]\AppData\Roaming\npm\node_modules\vs-mda-targets]
或
- 转到工具 - >选项 - > Apache Cordova工具 - > Cordova工具 - >清除Cordova缓存
这篇关于在Visual Studio 2013上运行波纹仿真器的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!