The errors you get may depend on openSCAD version.
On Debian, using version 2021.01 I only get warnings, due to modules that are not present in your code snippet, but the model gets rendered correctly with the given code.
Image of the rendered model