a blog for those who code

Monday 25 May 2015

NodeJS - npm WARN package.json : No repository field

In this post we are going to discuss about npm warning message "npm WARN package.json No repository field". This warning comes up when you are trying to install any npm packages. This is just a warning so actually you do not have to worry about it.

This warning means that the package does not have the repository field in the package.json. This field is used just for informational purposes. Suppose you are an author of a package and you are getting this error, you can write the below code in your package.json to remove this warning.

"repository": {
    "type" : "git",
    "url" : "Your_Package_URL"

According to NPM, repository means the place where your code lives. This is helpful for people who wants to contribute. If the git repository is on GitHub, then the npm docs command will be able to find you.

PC : https://docs.npmjs.com/files/package.json#repository

You can also check the issues already logged https://github.com/npm/npm/issues/3568. Please Like and Share the Blog, if you find it interesting and helpful.

No comments:

Post a Comment