本文介绍了Visual Studio/多设备混合应用程序CTP/Cordova-找不到导入的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用Multi Device Hybrid Apps CTP在Visual Studio 2013中创建新的空白Cordova应用程序时,出现以下错误消息.

When I attempt to create a new blank Cordova app in Visual Studio 2013 with the Multi Device Hybrid Apps CTP I get the following error message.

还有其他人经历过吗?我当时以为这可能是节点/NPM问题,但是它们都可以在我的机器上正常工作(安装之前和之后).

Has anybody else experienced this? I was thinking that it could be a Node/NPM issue but they both work correctly on my machine (before and after the install).

我应该提到我已经尝试过在这里找到的答案:.

I should have mentioned that I already tried the answer found here: Cordova Multi-Device Hybrid Apps (Preview) for Visual Studio | Can't load project.

推荐答案

我和Levi有相同的确切错误,这是因为在安装过程中没有在node_modules目录中创建一些目录.重新安装节点和/或整个CTP2.0,重新启动,拍手,尖叫等都无法在我的环境中解决此问题.在另一台PC上,这可以正常工作.要解决此问题:

I had the same exact error as Levi and it was because a few directories were not created in the node_modules directory during installation. Re-installing node and/or the entire CTP2.0, restarting, clapping my hands, screaming, etc would not fix this in my environment. On another PC, this worked fine. To fix this problem:

  1. 导航到C:\Program Files (x86)\Microsoft Visual Studio12.0\Common7\IDE\Extensions\并搜索"vs-mda".您应该同时找到"vs-mda"和"vs-mda-targets"文件夹. (进行递归搜索,您将无法在扩展名"中找到这些文件夹,而是在一个随机命名的文件夹中)
  2. 将这两个文件夹复制到错误所在的位置关于%appdata%\npm\node_modules\
  3. 重新启动Visual Studio,错误应消失
  1. Navigate to C:\Program Files (x86)\Microsoft Visual Studio12.0\Common7\IDE\Extensions\ and search for "vs-mda". You should find both a "vs-mda" and "vs-mda-targets" folder. (Make a recursively search, you won't find the folders exactly in "Extensions", there are inside of a random-named folder)
  2. Copy those two folders to the location the error is complainingabout%appdata%\npm\node_modules\
  3. Restart Visual Studio and the error should go away

现在,一旦可行,我仍然会丢失Git CLI的错误消息.通过此答案解决了该问题.

Now, once this worked, I still got an error about the Git CLI missing. That was solved with this answer.

我希望这会有所帮助!

这篇关于Visual Studio/多设备混合应用程序CTP/Cordova-找不到导入的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 05:48