My First NPM Package

XDEV 200
1 min readFeb 6, 2021

--

It was an exciting experience whenever you create something for the first time. For me, it is my first NPM package and also my first Open source contribution. In this article, I will describe how easy to publish NPM Package.

Step 1: npm account

npm-signup

Step 2: Login

We will use Console or Terminal to Login

$ npm adduser or npm login

You’ll get a prompt for your username, password, and email.

Logged in as username to scope @username on registry.npmjs.org.

Step 3: Let’s make a package

Create a Folder$ mkdir directory_nameCreate a File - Package.json inside the folder$ cd directory_name$ npm init Edit the name in package.json
{
"name": "@username/number-system-converter"
}
Note: username: Your NPM username prefix with the '@' symbol
COPY

Step 4: Publish Package

npm publish — access=public — first time

npm publish — for update

If everything goes well You will see

+@username/packagename@1.0.0

My First NPM Package

Original Post

--

--

XDEV 200

Hi, I am Jamshedpur-native, Developer turned Entrepreneur. I am a FullStack Developer with MERN and Python-Django.