On Mac m1 you have to choose Debian 11 bullseye or Alpine as base for your NodeJS as the arm version of the Sharp library can compile only on those.
You can change that in your project target docker options.
We use sharp for image resizing, in the next update this will be also made optional, so it won’t be installed if you don’t do image resizing.