I just had the same exact error message
TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ENOENT')
I suspected and error in the build.json; then I came to this post on StackOverflow but in my case config.xml was valid.
Finally I found that the command `cordova run android` pops this error when there are no device available! (no device or an offline device)
I was working remote and the connected device was offline. I added and ran an emulator and it worked.
Bad error messages are killing us :(