Node/Usage: Difference between revisions

From ALT Linux Wiki
No edit summary
Line 13: Line 13:
  </tt># apt-get install nvm</tt>
  </tt># apt-get install nvm</tt>


=== Post install ===
=== For development ===


Our ruby uses '''nvm''' even for both '''build''' process and for '''usage'''. To use custom gems in userspace, to install an additional node module or side modules, you have to add a user into ''nvm'' group:
There are the two locations for installing ad additional node instances:
</tt># usermod [USER] -aG nvm</tt>
* for root user it is a /var/lib/nvm/
or
* for regular user it is a $HOME/.nvmrc/
</tt>$ sudo bash -c "usermod \$SUDO_USER  -aG nvm"</tt>
 
And then '''''relogin''''' as the user.
 
The group '''nvm''' is required to use ''nvm'' to install new or custom version of node, additionally to system's one.
 
=== For development ===


Development package for ruby is called as the '''ruby-devel''', it contains all the prepequisites to ''build'' an other ruby with ''nvm'' or without, along with the development headers. Just install it as follows:  
Development package for ruby is called as the '''ruby-devel''', it contains all the prepequisites to ''build'' an other ruby with ''nvm'' or without, along with the development headers. Just install it as follows:  

Revision as of 23:18, 25 March 2025

Usage

You have to use system node generally for several purposes, so you have to:

  1. use application, which strictly requires node;
  2. use node for development only purposes on your local machine;

Usage system node for any other cases along with the specific production case is UNSUPPORTED.

Installation

You have to install node for use just type in console as root:

# apt-get install nvm

For development

There are the two locations for installing ad additional node instances:

  • for root user it is a /var/lib/nvm/
  • for regular user it is a $HOME/.nvmrc/

Development package for ruby is called as the ruby-devel, it contains all the prepequisites to build an other ruby with nvm or without, along with the development headers. Just install it as follows:

# nvm ls-remote

Then install required node as follows:

$ nvm install v16.20.2