问题
I'm using Visual Studio 2017 community edition, and simply using steps in vs documentation to build remotely using macincloud service.
I basically get stuck with the following explicit error:
Remote build error from the build server https://xxxx.macincloud.com:3000/cordova - Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. Please update your cordova-ios version.
So it's clearly telling me to update cordova-ios as it's using below 4.3.0. However, I can't seem to figure out a way to update it. Almost all documentation to upgrade cordova using npm command line after installing node. The command is:
npm -g install cordova
However, this gives me some warnings about taco-toolset@6.3.1 and never updates anything. If I go to visual studio and open my config.xml, it clearly shows that it's using Cordova Toolset 6.3.1 and cordova-ios is 4.2.0. It's just not updating the toolset.
I cannot find any stackoverflow question referencing this error. I have looked in to vs extension updates, but there is nothing there. I hope someone can help. I can't be the only one having this issue.
Here is what I get when I try to update cordova from cli. I first browse to the project folder, maybe that's wrong, but that's my understanding. Here is the output:
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 gives me 6.3.1, doesn't update. npm cordova -v gives me 2.15.10
Any advice?
回答1:
Ok, so I was finally able to update. I noticed from the messages that it was using the path: C:\ProgramData\Microsoft\VisualStudio\MDA\10a7b933\taco-toolset-6.3.1\node_modules\cordova
So I went to windows explorer and deleted this folder manually. Then I installed cordova again and it finally worked! Something is off about taco-toolset.
回答2:
If you double-click on your config.xml file, it should open as a tabbed form page in Visual Studio 2017. Under the "Toolset" tab, you have a choice between Cordova 6.3.1 and your global cordova version. Try again to install Cordova 7.0.1 globally. Use Windows Powershell running as Administrator.
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>
Now you should be able to Go to config.xml > Toolset > and choose your globally installed Cordova, in Visual Studio.
来源:https://stackoverflow.com/questions/44775385/error-building-ios-vwith-cordova-toolset