Using nvm to manage node versions https://github.com/nvm-sh/nvm
Follow the steps in https://docs.mendix.com/apidocs-mxsdk/mxsdk/setting-up-your-development-environment/
Do not forget to create and use a Personal Access Token. Export the PAT as:
export MENDIX_TOKEN=<your acess token>