Visual Studio/Multi Device Hybrid Apps CTP / Cordo

2019-02-19 03:59发布

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.

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).


Edit: 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.

2条回答
看我几分像从前
2楼-- · 2019-02-19 04:09

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. Navigate to C:\Program Files (x86)\Microsoft Visual Studio 12.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 complaining about%appdata%\npm\node_modules\
  3. Restart Visual Studio and the error should go away

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

I hope this helps!

查看更多
何必那么认真
3楼-- · 2019-02-19 04:11

MDHA projects require that Node be installed on your machine to be able to create a project. While you mention that NodeJS is installed, there's a possibility it may be stale or corrupted.

Try these steps:

  • Close VS
  • Uninstall NodeJS
  • Reboot machine
  • Install NodeJS from nodejs.org
  • Start VS and try to create a project

This should resolve your issue.

查看更多
登录 后发表回答