Node 22 upgrade results in "unexpected end of file"

This is good for actions. How can I do this for custom database scripts.