You can't. As the error message says, GCF Gen1 does not support Node.js 22. The table on this documentation page confirms that (notice how Node.js 22 only has "2nd gen" in the "Generation" column):