Not sure what is wrong, your apps script looks OK.
There is a minor difference that should not have an impact:
var id = e.parameter.id;
change to
var id = e.parameter.id ;
(add a space between the “d” and the “;”)
I tested it in a new script (with V8 runtime) and it saves OK for me. Try starting again, see if you get the same problem?