upleveled / system-setup

Set up a PERN development environment on Windows, macOS and Linux
28 stars 19 forks source link

ERR_PNPM_NO_GLOBAL_BIN_DIR when installing Preflight on Ubuntu #58

Closed CornaSn closed 4 months ago

CornaSn commented 5 months ago

https://github.com/upleveled/system-setup/blob/main/linux.md - step 14

Copied this step:

sudo pnpm add --global @upleveled/preflight

Received this error:

$ sudo pnpm add --global @upleveled/preflight
[sudo] Passwort für corna: 
 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.

The command pnpm setupalso doesn't solve the problem

karlhorky commented 5 months ago

@CornaSn thanks for the report!

Could you paste the output that you received from pnpm setup? (you may need to run pnpm setup with sudo in front of it)

As far as I know, sudo pnpm setup should set up the global bin directory that the other command needs.

CornaSn commented 4 months ago

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.

sudo pnpm setup doesn't fix the problem

CornaSn commented 4 months ago

so here is what i tried

$ 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.

$ pnpm setup

No changes to the environment were made. Everything is already up to date.

$ sudo pnpm setup

No changes to the environment were made. Everything is already up to date.

$ preflight

preflight: Befehl nicht gefunden.

Also I don't know, why some messages are in english and others are in german.

ProchaLu commented 4 months ago

@CornaSn tested the pnpm add --global @upleveled/preflight command (without sudo) and it worked - this appears to be the correct command