问题
I have installed Multi-Device Hybrid Apps for Visual Studio 2013 - CTP2,and other development tools are properly set up.
Now I get some errors when trying to build for Android, iPhone, and for Windows Phone.
error 1: Cannot find module 'qs'
error 2: “"C:\Users\Administrator\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" prepare --platform Android --configuration Debug --projectDir . --projectName "AngularJSToDo" --language "zh-CN"” exited with code 8。 C:\Users\Administrator\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets
please help me with this problem.
回答1:
It seems something went wrong while installing Cordova and other dependencies. q module is a library for promise.
Run following npm commands from command prompt,
- 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]
- Open project and build
来源:https://stackoverflow.com/questions/25757260/error-when-building-angularjstodo-hybrid-app-in-visual-studio