构建ios vwith cordova工具集时遇到错误

时间:2017-06-27 08:19:46

标签: ios cordova visual-studio-2017 visual-studio-cordova

我正在使用Visual Studio 2017社区版,只需使用vs文档中的步骤即可使用macincloud服务进行远程构建。

我基本上遇到了以下显式错误:

来自构建服务器https://xxxx.macincloud.com:3000/cordova的远程构建错误 - 构建失败并出现错误Remotebuild要求您的项目在XCode 8.3中使用cordova-ios 4.3.0或更高版本。请更新您的cordova-ios版本。

所以它清楚地告诉我更新cordova-ios,因为它在4.3.0以下使用。但是,我似乎无法找到更新它的方法。几乎所有安装节点后使用npm命令行升级cordova的文档。命令是:

npm -g install cordova

但是,这给了我一些关于taco-toolset@6.3.1的警告,并且从不更新任何内容。如果我去visual studio并打开我的config.xml,它清楚地表明它使用的是Cordova Toolset 6.3.1,而cordova-ios是4.2.0。它只是没有更新工具集。

我找不到任何引用此错误的stackoverflow问题。我已经查看了vs扩展更新,但没有任何内容。我希望有人能帮帮忙。我不可能是唯一有这个问题的人。

以下是我尝试从cli更新cordova时得到的内容。我首先浏览项目文件夹,也许这是错的,但这是我的理解。这是输出:

npm WARN package.json taco-toolset@6.3.1 No description
npm WARN package.json taco-toolset@6.3.1 No repository field.
npm WARN package.json taco-toolset@6.3.1 No README data
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
(node:8940) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners()
 to increase limit
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
C:\ProgramData\Microsoft\VisualStudio\MDA\10a7b933\taco-toolset-6.3.1\cordova -> C:\ProgramData\Microsoft\VisualStudio\M
DA\10a7b933\taco-toolset-6.3.1\node_modules\cordova\bin\cordova
cordova@6.3.1 C:\ProgramData\Microsoft\VisualStudio\MDA\10a7b933\taco-toolset-6.3.1\node_modules\cordova
├── underscore@1.7.0
├── q@1.0.1
├── nopt@3.0.1 (abbrev@1.1.0)
├── update-notifier@0.5.0 (is-npm@1.0.0, semver-diff@2.1.0, chalk@1.1.3, string-length@1.0.1, repeating@1.1.3, configsto
re@1.4.0, latest-version@1.0.1)
├── insight@0.8.4 (object-assign@4.1.1, async@1.5.2, uuid@3.1.0, lodash.debounce@3.1.1, tough-cookie@2.3.2, chalk@1.1.3,
 os-name@1.0.3, configstore@1.4.0, request@2.81.0, inquirer@0.10.1)
├── cordova-common@1.4.1 (cordova-registry-mapper@1.1.15, unorm@1.4.1, underscore@1.8.3, q@1.5.0, semver@5.3.0, ansi@0.3
.1, osenv@0.1.4, bplist-parser@0.1.1, glob@5.0.15, minimatch@3.0.4, shelljs@0.5.3, elementtree@0.1.7, plist@1.2.0)
└── cordova-lib@6.3.1 (valid-identifier@0.0.1, cordova-registry-mapper@1.1.15, opener@1.4.1, unorm@1.3.3, properties-par
ser@0.2.3, semver@4.3.6, nopt@3.0.6, dep-graph@1.1.0, shelljs@0.3.0, glob@5.0.15, xcode@0.8.9, init-package-json@1.10.1,
 elementtree@0.1.6, request@2.47.0, cordova-serve@1.0.1, aliasify@1.9.0, tar@1.0.2, cordova-app-hello-world@3.10.0, cord
ova-fetch@1.0.2, plist@1.2.0, cordova-js@4.1.4, npm@2.15.12)

cordova -v给了我6.3.1,没有更新。 npm cordova -v给了我2.15.10

有什么建议吗?

2 个答案:

答案 0 :(得分:2)

如果双击config.xml文件,它应该在Visual Studio 2017中作为选项卡式表单页面打开。在“工具集”选项卡下,您可以选择Cordova 6.3.1和您的全局cordova版本。再次尝试全局安装Cordova 7.0.1。使用以管理员身份运行的Windows Powershell。

PS D:\Projects\Current\Cordova_API_client\cordova> npm cordova -v
5.0.0

PS D:\Projects\Current\Cordova_API_client\cordova> npm install -g cordova
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
C:\Users\keith\AppData\Roaming\npm\cordova -> C:\Users\keith\AppData\Roaming\npm\node_modules\cordova\bin\cordova
added 607 packages in 58.432s

PS D:\Projects\Current\Cordova_API_client\cordova> cordova -v
? May Cordova anonymously report usage statistics to improve the tool over time? Yes

Thanks for opting into telemetry to help us improve cordova.
7.0.1

PS D:\Projects\Current\Cordova_API_client\cordova>

现在你应该可以转到config.xml>工具集>并在Visual Studio中选择全局安装的Cordova。

答案 1 :(得分:2)

好的,所以我终于能够更新了。我从消息中注意到它正在使用路径:C:\ ProgramData \ Microsoft \ VisualStudio \ MDA \ 10a7b933 \ taco-toolset-6.3.1 \ node_modules \ cordova

所以我去了Windows资源管理器并手动删除了这个文件夹。然后我再次安装了cordova,它终于工作了!有关taco-toolset的事情有些不对劲。