Replies: 2 comments
-
|
There's no official installer for this, but the following approach works reliably. curl -fsSL https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64 -o /opt/pnpm/pnpm
chmod +x /opt/pnpm/pnpm
ln -s /opt/pnpm/pnpm /usr/local/bin/pnpmIf Node.js is already installed system-wide, Regarding a shared store for global installs: pnpm doesn't have a built-in "system store" separate from the user store, but you can approximate this by setting This was discussed previously in #5007, with the same conclusion: it works if |
Beta Was this translation helpful? Give feedback.
-
|
There is no official system-wide installer and no supported multi-user shared store, so this ends up being assembled from parts. For the binary itself the clean option is the standalone build: drop it in The store is the tricky part. By default each user gets their own store under their XDG data dir, and pnpm expects to own it. You can point everyone at a shared location by setting For service accounts specifically I would honestly skip the shared store and let each service user keep its own. The store is content-addressed, so the duplication is bounded, and you avoid the whole class of "installed fine as user A, EACCES as user B" issues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the recommended way to install pnpm as a system package, rather than just for a single user on Linux?
the install.sh only installs it for a single user, but I would like to install it in a way that it can be used by any user. In particular I want it to be usable by service users.
Is there a recommended method for that?
Also, is there any way to have a "system" store that is used in addition to the user store, so that I could install npm packages in a system global way, so that any user has access to the executables/bin from those packages? Say, install the packages somewhere in /var/lib or /opt, and symlink the executables from /usr/local/bin.
I'm sorry if this is a duplicate, it is rahter difficult to search for.
#5005 is related, but not quite the same thing.
Beta Was this translation helpful? Give feedback.
All reactions