Reputation: 10232
After installing Node, fresh installation of Yeoman throws several warnings.
Command
sudo npm install -g yo
Warnings
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No readme data.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
I am not sure, whether I should be worried about these warnings or just ignore them! Either ways I want to understand the reason behind getting these warnings.
Upvotes: 0
Views: 430
Reputation: 1086
This isn't specific to Yeoman.
Anytime you run npm install
you are essentially saying, ok go look at the requirements in the package.json
file and grab all the dependencies necessary, aka the package on the NPM registry that are required to run this app.
As of npm 1.2.20, npm started having these warning visible when running npm install
to give an almost verbose look at the process of going through the package.json
file and downloading any necessary packages.
Since npm has made it super easy to upload your npm package to the npm registry, many people have NOT completely filled out all the possible details of their package.json
, because they're are not absolutely required. In this case you're seeing that many don't fill out the repository field or readme.
The bare minimum for a package.json
file is just the name and version of the package, everything else is optional, and thus why there are so many packages without fully complete package.json
files.
If you're curious about all the possible details one can add to a package.json file you can find them here starting with the repository field.
Upvotes: 2
Reputation: 30340
You don't need to worry about these warnings. npm
is letting you know that some of Yeoman's dependencies haven't set the location of their source code repositories in their package.json
files (and one doesn't have a readme file).
A lot of packages don't list repository urls in package.json
, and it isn't a problem. It's there to make it easier for developers to find the project's code, but Google should serve you equally well.
If it concerns you, you could search for the projects' repositories and raise a defect or submit a patch with an amended package.json
.
Upvotes: 1