I am trying to migrate node from @prismicio/client v5 to v6

It looks like you found the answer for this issue here: