Hi Toshi,
The reason why you are encountering the issue is because of the line below.
const campaign = campaigns.next();
You would need to use var instead of const as a constant can't be changed through reassignment.
var campaign = campaigns.next();
Please let me know how it goes after trying the suggestion.
Regards,
Hiroyuki
Google Ads Scripts Team