Actually I thought it's working, but unfortunately the same message still occurs and I'm unable to find a solution.
sudo pnpm add --global @upleveled/preflight
ERR_PNPM_NO_GLOBAL_BIN_DIR Unable to find the global bin directory
Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.
Actually I thought it's working, but unfortunately the same message still occurs and I'm unable to find a solution.
sudo pnpm setup
doesn't fix the problem