Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tutorial] Installing nodejs and npm #287

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

krishnamrutha2002
Copy link

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature
/kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind TESTED
/kind NOT-TESTED

Test Report:

Special notes for your reviewer:

krishnamrutha2002 and others added 7 commits March 27, 2023 22:27
steps to install nodejs and npm
steps to update
Steps to manage multiple  versions
Copy link
Member

@anvithks anvithks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @krishnamrutha2002 @komalkumar262 @kens077
Please check the review comments.

@@ -0,0 +1,105 @@
# How to install and setup NodeJS and npm?
- **step 1:**
Open the Terminal on your Ubuntu system. You can do this by pressing the **"Ctrl+Alt+T"** keys simultaneously.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Use code block to represent commands or keys
for ex: Ctrl+Alt+T

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok done


`node -v`

This will display the version number of Node.js installed on your system.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding example output of the commands. this will help people understand if the command has executed correctly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will surely add some screenshorts

- **step3:**
Install Nodejs using the following command:

`sudo apt get install node js`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? I don't think this will work. is the package node js ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, there is no space in between
we will do the required changes

- **step5:**
Install NPM (Node Package Manager) by typing the following command:

`sudo apt-get install npm`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually installing the NodeJS package installs npm alongwith. Please check if this is correct.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

- **step 2:**
Check the currently installed versions of Node.js and NPM by typing the following commands:

`node -v npm -v`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two separate commands usually need to be separated with &&

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

## How to manage multiple versions of node.js and npm using nvm

- **Step1:**
Install nvm on your Ubuntu system by running the following command in your terminal:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be repeated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah will surely check


`node -v npm -v`
- **step3:**
To update Node.js, you can use the Node Version Manager (nvm) tool. If you do not have nvm installed, you can install it using the following command:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section should contain steps to update NodeJS and NPM without using NVM.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the question, it was mentioned with using nvm, we will surely add without using nvm too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Install appropriate version of NodeJS and Npm based on the OS and version
    • How to update the NodeJS and npm versions -> This is the current section. Thisis without NVM
    • How to manage multiple versions of NodeJS using nvm -> This is the next section.


`nvm install <node_version>`

Replace **<node_version>** with the version of Node.js you want to install, such as "14.18.1". This will download and install the specified version of Node.js.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding some info about LTS versions of NPM and how to install / use them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

anvithks
anvithks previously approved these changes Apr 3, 2023
Copy link
Member

@anvithks anvithks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @krishnamrutha2002 @komalkumar262 @kens077
Consider adding the section to install LTS versions.

@krishnamrutha2002
Copy link
Author

krishnamrutha2002 commented Apr 3, 2023 via email

@anvithks anvithks changed the title Installing nodejs and npm tutorial [Tutorial] Installing nodejs and npm Apr 4, 2023
Copy link
Member

@anvithks anvithks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants