I installed Express.js with the following command:
sudo npm install -g express
I get the following 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. 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 repository field.
I'm new to Node.js and Express.js. Why do I have the above warnings? Should I be worried?
If you find the same deprecation messages, then you can try to see if there's an open issue in GitHub discussing the deprecation messages. While you can run the npm install command to get the required package version, it's not necessary as the module should still work.
you need to change that to npm --logevel=error install , and that will suppress the WARN message and Team Foundation Server will stop complaining about it.
The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.
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 regarding package.json
problems.
{ "name": "my-super-amazing-app", "version": "1.0.0", "private": true }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With