我完整安装了 VS 2015 Enterprise + Tools for Apache Cordova。当我打开或创建任何项目时,它不会构建,甚至不会在“运行”按钮上显示 Ripple 模拟器或设备信息。
我已经完全重新安装了,但还是一样。
当我单击配置窗口中的“依赖性检查”按钮时,一切正常。
当我尝试构建时:
npm ERR! Windows_NT 6.3.9600 1> npm ERR! argv "node" "C:\Users\%UserProfile%\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "-g" "install" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac" "--loglevel" "warn" 1> npm ERR! node v0.12.2 1> npm ERR! npm v2.12.0 1> npm ERR! undefined is not a function 1> npm ERR! 1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at: 1> npm ERR! https://github.com/npm/npm/issues 1> npm ERR! Please include the following file with any support request: 1> npm ERR! C:\Users\%UserProfile%\Documents\Visual Studio 2015\Projects\BlankCordovaApp10\BlankCordovaApp10\npm-debug.log 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1> npm WARN uninstall not installed in C:\Program Files (x86)\nodejs\node_modules: "vs-tac" 1> npm ERR! Windows_NT 6.3.9600 1> npm ERR! argv "node" "C:\Users\%UserProfile%\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "-g" "install" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac" "--loglevel" "warn" 1> npm ERR! node v0.12.2 1> npm ERR! npm v2.12.0 1> npm ERR! undefined is not a function 1> npm ERR! 1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at: 1> npm ERR! https://github.com/npm/npm/issues 1> npm ERR! Please include the following file with any support request: 1> npm ERR! C:\Users\%UserProfile%\Documents\Visual Studio 2015\Projects\BlankCordovaApp10\BlankCordovaApp10\npm-debug.log 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1> npm WARN uninstall not installed in C:\Program Files (x86)\nodejs\node_modules: "vs-tac" 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(287,5): error : Error installing local npm package. 1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\%UserProfile%\AppData\Roaming\npm\node_modules\vs-tac\app.js'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我确实使用“配置”按钮清理了缓存,但仍然相同。当运行npm 缓存清除
时,软件包会安装,但运行按钮不会显示设备信息,正如我之前所说。
编辑:
@Subhag Oak 谢谢!这从“运行”按钮返回了菜单选项,但当我尝试运行/构建时仍然出现错误:
------ npm install of vs-tac@1.0.0 from C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac completed. 1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\FilipeAugusto\AppData\Roaming\npm\node_modules\vs-tac\app.js'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
最佳答案
我通过以下步骤解决了这个问题:
1. 从以下位置复制 vs-tac
文件夹:C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\
到AppData漫游文件夹。
- 我打开了 AppData\roaming 文件夹的 VS 2015 开发人员提示,我在其中复制了
vs-tac
包并运行npm 安装
关于visual-studio-2015 - Visual Studio 2015 无法与 Apache Cordova 工具一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31679802/