I just created a new package: https://github.com/supericium/pli
I\'m now trying to publish it to NPM for the first time like this:
ole@MKI:~/Sand
If you publish from an ubuntu envinroment, first authenticate with
npm login
then after just do
sudo npm publish
It's solved by npm login
in my case, the error message is misleading
in my case i noticed that my npm account username in npm website is different than my npm normal user name. When i try to publish in console by login with normal username gave me this error.
publish Failed PUT 404 npm ERR! code E404 npm ERR! 404 User not found
But after login to console with account name it has published successfully
I encountered the same problem but I successfully resolved it by uninstalling the LTS version, then installing Current version along with yarn.
In my case i accidentally typed https://registry.npmjs.org
instead of https://registry.npmjs.com
(.org vs .com)