3
votes

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
Looks this was answered here as well: stackoverflow.com/questions/24212443/…Burcu K
Sorry, I should have mentioned that I already tried that.Levi Botelho
Could you explain what you mean by "I was thinking that it could be a Node/NPM issue but they both work correctly on my machine (before and after the install)."Priyank
Because the error involves a node modules folder, the thought had crossed my mind that my Node installation could be part of the problem. However Node works and always has worked on my computer so I doubt that a good installation could be the cause of this. The fact that the product is in CTP is much more likely.Levi Botelho
@Dai I've got the same problem with community edition. Now I've found that the two main pre-requirements for MDA3.1 is not available in community edition of VS2013IsmailS

2 Answers

1
votes

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.

1
votes

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!