Node.js Tutorial Linux

Introduction

Node.js® is an open-source, cross-platform JavaScript runtime environment.

currently I am running the latest version for right now 18.17.1.

after installing node.js to your system you get a Node Package Manager acronymed as npm. We are going to use npm as our package manager to install and uninstall nodejs packages.

[don't get feared by (base) written in the terminal its just python envs]

working

nodejs two options 

1. whether to install packages locally inside a folder which not conflicts with the system dependencies.

this command by default installs packages locally.

2. install packages globally which is extensively used for command line utilities that needed to be accessed globally from any instance of the terminal. 


by adding an argument -g at after install tells nodejs to install package globally 

commands:

1. list the locally installed packages.


this command shows that one package is installed locally in the system at /home/username location.

2. list the globally installed packages.


now rest of the commands are same for both locally and globally managing packages with the only difference of -g argument in the commands.

3. uninstalling a package




Next Post Previous Post
No Comment
Add Comment
comment url