Set up error with node v20

I am follwoing the steps in joplin/BUILD.md at master · laurent22/joplin · GitHub, om running the yarn install I am gettin this error in the terminal.

❯ sudo yarn install
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 641ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ @types-jsdom-npm-21.1.6-29114a659c-d6fbaab306.zip appears to be unused - removing
➤ YN0000: └ Completed in 1s 329ms
➤ YN0000: ┌ Link step
➤ YN0007: │ husky@patch:husky@npm%3A3.1.0#./.yarn/patches/husky-npm-3.1.0-5cc13e4e34.patch::version=3.1.0&hash=d9603f&locator=root%40workspace%3A. must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed
➤ YN0007: │ sharp@npm:0.33.4 must be built because it never has been before or the last one failed
➤ YN0007: │ sqlite3@npm:5.1.6 [ea905] must be built because it never has been before or the last one failed
➤ YN0007: │ canvas@npm:2.11.2 must be built because it never has been before or the last one failed
➤ YN0007: │ tesseract.js@npm:5.1.0 must be built because it never has been before or the last one failed
➤ YN0007: │ wasm-pack@npm:0.13.0 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ tesseract.js@npm:5.0.4 must be built because it never has been before or the last one failed
➤ YN0007: │ electron@npm:32.2.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:0.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-common-types@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0009: │ canvas@npm:2.11.2 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-3ca617f8/build.log)
➤ YN0009: │ canvas@npm:2.11.2 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-d2301cb9/build.log)
➤ YN0009: │ canvas@npm:2.11.2 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-f1cad43f/build.log)
➤ YN0009: │ sharp@npm:0.33.4 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-162a7ce9/build.log)
➤ YN0009: │ sharp@npm:0.33.4 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-564520f6/build.log)
➤ YN0009: │ sharp@npm:0.33.4 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-3475590a/build.log)
➤ YN0009: │ sharp@npm:0.33.4 couldn't be built successfully (exit code 1, logs can be found here: /private/tmp/xfs-e6f8e6ec/build.log)
➤ YN0007: │ root@workspace:. must be built because it never has been before or the last one failed
➤ YN0007: │ @joplin/app-mobile@workspace:packages/app-mobile must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:1.2.36 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:5.15.4 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-brands-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-regular-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.4.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/fontawesome-svg-core@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @fortawesome/free-solid-svg-icons@npm:6.1.2 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 12m 32s
➤ YN0000: Failed with errors in 12m 35s

System: MacOS
Node: v20.18.0
python 3.13

Based on the error, it looks like sharp and canvas are failing to build. These dependencies both have information about when/how yarn/npm builds them from source, which may be helpful: