When I use my globally installed Cordova 7.1.0 toolset and do an iOS remote build (to simulator or to Local Device), I almost immediately get the error message:
This is due to a bug in NPM 5.5. I'm fairly certain it's related to this bug:
https://github.com/npm/npm/issues/17858
I installed NodeJS 6.* (and not the latest LTS 8.*) and the issue went away. Reinstalling 8.* causes the issue to creep up again.