Error publishing a new version of a package in npm

I also had the same problem. for me the email was not verified. You can login on npmjs.org and verify the email.


I don't know, What happen in your code during installation package. Please check here : https://docs.npmjs.com/getting-started/creating-node-modules to take a look how to install package modules. These are simple way to install package :

Publish your package to npm
Make a new directory outside of your project and cd into it
Run npm install <package>
Create a test.js file which requires the package and calls the method
Run node test.js. The message should be output.

#To publish on npm registry

You need to create npm user. You can follow here. In short

npm adduser
npm login

Do npm config ls to ensure that credentials are stored on your client. Then try

npm publish.

To install it locally OR test packaging your module

You can try

tar -tf $(npm pack)
npm install <path/to/your/package.tgz>

I checked here and here for references.