I installed expressjs with the following command:
sudo npm install -g express
I have the following warning:
npm WARN package.json range-parser@0.0.4 No repository field.
npm WARN package.json fresh@0.1.0 No repository field.
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json methods@0.0.1 No readme data.
npm WARN package.json cookie-signature@1.0.1 No repository field.
npm WARN package.json send@0.1.0 No repository field.
npm WARN package.json pause@0.0.1 No repository field.
npm WARN package.json bytes@0.2.0 No repository field.
npm WARN package.json github-url-from-git@1.1.1 No repository field.
npm WARN package.json assert-plus@0.1.2 No repository field.
npm WARN package.json ctype@0.5.2 No repository field.
Im new to nodejs and expressjs. Why I have the above warnings? Should I be worried?
It's just a check as of NPM v1.2.20, they report this as a warning.
However, don't worry, there are sooooooo many packages which still don't have the repository field in their package.json. The field is used for informational purposes.
In the case you're a package author, put the repository in your package.json, like this:
"repository": {
"type": "git",
"url": "git://github.com/username/repository.git"
}
Read more about the repository field, and see the logged bug for further details.
Additionally, as originally reported by @dan_nl, you can set private key in your package.json.
This will not only stop you from accidentally running npm publish in your app, but will also stop NPM from printing warnings.
{
"name": "my-super-amazing-app",
"version": "1.0.0",
"private": true
}
you can also mark the application as private if you don’t plan to put it in an actual repository.
{
"name": "my-application",
"version": "0.0.1",
"private": true
}
If you are getting this from your own package.json, just add the repository field to it. (use the link to your actual repository):
"repository" : {
"type" : "git",
"url" : "http://github.com/npm/npm.git"
}
As dan_nl stated, you can add a private fake repository in package.json. You don't even need name and version for it:
{
...,
"repository": {
"private": true
}
}
Better still: Set the private flag directly. This way npm doesn't ask for a README file either:
{
"name": ...,
"description": ...,
"version": ...,
"private": true
}
This solution applies to windows platform, assuming you have installed every prerequisite.
Create repositorybower installIt will download bower_component and it should now work.
Have you run git init? That command runs you through everything...