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
NPM login
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"
}
}