What is the process for releasing an NPM package to the NPM registry rather than the GitHub registry?

I have developed an NPM package available at - (https://github.com/fyndreact/nitrozen)

The package was successfully published on the Github registry (), but I am looking to publish it on the NPM registry.

However, I cannot locate the package in the NPM registry https://www.npmjs.com/

Here are the steps I have taken so far:

Login & publish NPM commands

  1. NPM login
  2. NPM publish --access=public

I removed the following publishConfig section from the package.json file before publishing:

   "registry": "https://npm.pkg.github.com/fyndreact",
   "access": "public"
 } 

After executing the NPM publish command, the output shows details of the package being uploaded to the GitHub registry instead of the NPM registry. How do I ensure that I publish this package to the NPM registry (https://www.npmjs.com/)?

package.json

{
  "name": "@fyndreact/nitrozen",
  "version": "2.2.7",
  "description": "React component library inspired by Nitrozen",
  "private": false,
  "scripts": {
    "rollup": "rollup -c",
    "test": "jest",
    "test:coverage": "npm test -- --coverage",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook -o docs",
    "lint:check": "prettier --check .",
    "lint:format": "prettier --write .",
    "prepare": "husky install"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": "eslint --fix",
    "*.{css,scss,sass}": "stylelint --fix",
    "**/*": "prettier -w -u"
  },
  "author": "Fynd Opex Frontend",
  "license": "ISC",
  "devDependencies": {...},
  "main": "dist/cjs/index.js",
  "module": "dist/esm/index.js",
  "files": [
    "dist"
  ],
  "types": "dist/index.d.ts",
  "dependencies": {...},
  "publishConfig": {
    "registry": "https://registry.npmjs.org/",
    "access": "public"
  }
}

Answer №1

Everything is looking good, but there is a small tweak needed in the code under publishConfig

 "publishConfig": {
    "registry": "https://registry.npmjs.org/",
    "access": "public"
  },

For more information, check out this resource

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing a custom function to filter Firestore collection data based on location proximity

I have a question about filtering a Firestore collection using a function where the values of the documents in the collection are used as arguments. Let's say we have a Firestore collection with documents structured like this: { pointOfInterest: "S ...

Ways to extend div to fill the rest of the page's vertical space

Apologies, my search has yielded many results, but none that directly address my specific issue. It appears that there is a proliferation of div-height problems on this platform. :-( Here is the layout I am working with for testing purposes: <!DOCTYPE ...

Unable to minimize or hide the ace editor widget with Cypress

Today marks the beginning of my journey into posting on this platform, and I am eager to get it right. In my current project using Cypress for writing integration tests, I encountered a challenge while attempting to click on an Ace editor widget within a ...

Executing the Docusaurus command to publish to Github Pages

Seeking assistance for a Windows user! I've tried various tutorials, but none have resolved my issue. Whenever I attempt to use the publish command in Git Bash, I encounter the following error: I am running Windows 10 and have tried both Github Desk ...

Encountering issues with installation of NextJS due to warnings about incorrect versions of npm

Issue Resolved: Upon further investigation, I discovered that I mistakenly navigated into a different project directory within my git folder, which had npm 6.5 listed as a dev dependency in its package.json file. Recently, while trying to start a new next ...

Updating a string's value in Angular based on user input

I am currently developing a custom offer letter template that will dynamically update key data points such as Name, Address, Role, Salary, etc based on the selected candidate from a list. The dynamic data points will be enclosed within <<>> in ...

What is the equivalent of jQuery's blur event in AngularJS?

I need to implement a functionality in AngularJS where any opened component is closed when clicking outside of it. Is there an existing Angular directive for handling blur events, or do I need to come up with a custom solution? ...

Updates to props values are not being reflected in the React js application running on the webpack

I keep facing an issue where I have to restart the webpack server every time I try to pass or update props values from parent to child components. It's frustrating that the props values are not updating even after saving the file. Take a look at my p ...

A quick guide on automatically populating text boxes with characteristics of the item chosen from a drop-down menu

On my webpage, I am looking to automatically populate textboxes with information (such as common name, location, etc.) of the selected shop from a dropdown list without having to refresh the page. Here is the dropdown list: <select id="shops" class="f ...

Sending state information through props in a Vuex environment

One of the challenges I am facing is how to make a reusable component that can display data from the store. My idea is to pass the name of the store module and property name through props, as shown below: <thingy module="module1" section=" ...

Get the name of the array using JavaScript

Here is an example of my situation: var list1 = ['apple', 'banana', 'orange']; var list2 = ['carrot', 'lettuce', 'tomato']; When I use: alert(list1) I get: apple, banana, orange. This is corre ...

The variable "module" is not recognized when attempting to run a code snippet from the official example

After attempting to run example code in my editor, I was faced with the issue that it did not work as expected (to no one's surprise). In order to make it function properly, I made some alterations. Interestingly enough, even after tweaking the code, ...

The table headers in the second table do not match the queryAllSelector

I've encountered an issue with my JavaScript snippet that displays a responsive table. When I use the snippet for a second table with the same class, the formatting gets messed up on mobile devices (try resizing your screen to see). It seems like the ...

What is the best way to generate a live map with constantly updating markers?

Is it possible for me to learn how to develop a live map similar to the one on this site: www.lightningmaps.org? It's fascinating to watch new markers pop up every few seconds. I'm interested in building a real-time map that can track IP locatio ...

Refresh two angular-datatables

I'm facing a challenge when it comes to updating two datatables simultaneously on the same page. Here's how my HTML is structured: <table id="datatable1" ng-if="Ctrl.dtOptions1" datatable="" dt-options="Ctrl.dtOptions1" dt-column-defs="Ctrl. ...

New features in Next.js 13 include an updated server component and enhanced fetch capabilities for re

Is it possible to toggle the URL from the getData function? I have my main page component with JSON todos. Can I replace 'todos' with 'users' in my client component? import styles from './page.module.css' import Button from "@ ...

Tips for dynamically displaying images in both horizontal and vertical orientations

I would like to showcase images in the imageList. Here is what I want: AB CD How can this be achieved? It's not a matter of being even or odd Perhaps the list could look something like this: ABCDE FG I simply want a new row or display:block when ...

Running two servers at the same time using nodemon might seem complex, but it

Is it possible to run two servers (www.js and apiServer.js) simultaneously using nodemon? I have set the value for the "start" key in package.json as https://i.stack.imgur.com/r8M7p.jpg After running nodemon in the command prompt with the current working ...

What causes the issue of divs not stacking properly when using Bootstrap 4?

I'm currently working on integrating VueJs and bootstrap4 to create two basic components. However, I am facing an issue where I have assigned the class .col-md-4 to a div in order to add 3 elements per row, but only one element is being added per row ...

Only retrieve links that don't have the specified class by using regular expressions

I am trying to extract all links from an HTML document using REGEX, except for those with a specific class name. For example: <a href="someSite" class="className">qwe</a> <a href="someSite">qwe</a> My goal is to only capture the ...