Installing node.js and npm on Debian12 on one Virtual Server / user

SYSTEM INFORMATION
OS type and version Debian Linux 12
Virtualmin version 7.20.2

To run Tiki Wiki 27 it is required to install node.js and npm (The Tiki 27 plus Build System | Tiki Wiki CMS Groupware :: Development). Then on changes the Tiki Admin (the virtual server user in my case) need to use “npm run watch” from time to time.

I couldn’t complete the installations of both unless I log as root and then only root can complete the Tiki setup and npm run watch. npm is glabally installed on the server and not “contained” in the VS.
Really not the good solution. :scream:

I would like to know how I can have node.js and npm installed AND run as the Virtual Server User.
Some help will be appreciated.

Bernard

1 Like

I always install NodeJS using NVM (Node Version Manager) as it enables multiple versions of NodeJS (and npm) to be installed. So each VS (admin) controls its own version. However I do not use npm these days I prefer Yarn/PNPM. I cannot comment on Tiki (never used it)

Thanks Stegan.
You mean this : GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Yes, that’s it. (but read the Important Notes for Debian/Ubuntu systems)

1 Like