npm notice Publishing to https://registry.npmjs.org/ npm ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/demo-package - You do not have permission to publish "demo-package". Are you logged in as the correct user? npm ERR! 403 In most cases, you or one of your dependencies are requesting npm ERR! 403 a package version that is forbidden by your security policy, or npm ERR! 403 on a server you do not have access to.
npm ERR! A complete log of this run can be found in: npm ERR! /home/kaleesha/.npm/_logs/2023-01-23T21_12_42_133Z-debug-0.log I try these steps, npm init npm login npm publish
I have npm account and I logged into it before published the package
demo-package
is a package that already exists on npmjs here. If you are not the user that initially published this package 8 years ago or the user enabled you as a coauthor, you are not allowed to write to it since you are not the owner.Be aware that npm Packages can not be removed once published on npmjs. There is a very short window to unpublish it. After that, it's not deletable. If you want to test publishing packages you can try local registries like Verdaccio.