Skip to main content

Command Palette

Search for a command to run...

My First NPM Package

Published
•2 min read•View as Markdown
My First NPM Package
M

👋 I'm a Jamshedpur native with a deep passion for entrepreneurship and web development. Armed with expertise in HTML, CSS, JavaScript, Node.js, and React, I specialize in crafting high-performance web applications that seamlessly blend design and technology.

🚀 One of my most significant accomplishments includes co-founding a startup and managing it for a successful three-year run. In just nine months, I took the product from inception to a thriving ecosystem with 25+ merchants and a loyal customer base of 1500+.

🌟 I have over five years of frontend development experience and a passion for pushing the boundaries of web design with React.js. Beyond coding, you'll find me engaged in ♟️ chess battles, 🎬 movies, and grooving 🎵 to music with friends. I'm a detail-oriented computer science engineer committed to excellence in every project. Let's create something extraordinary together!

npm2.jpeg

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 https://registry.npmjs.org/.

Step 3: Let’s make a package

Create a Folder

$ mkdir directory_name

Create 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

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

49 views