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.
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.
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:
- 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)
- Copy those two folders to the location the error is complaining
about
%appdata%\npm\node_modules\
- 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!