It's just a check as of NPM v1.2.20, they report this as a warning.
(这只是NPM v1.2.20的检查,他们将此报告为警告。)
However, don't worry, there are sooooooo many packages which still don't have the repository
field in their package.json
.
(不过,不用担心,有仍然没有sooooooo许多包repository
在自己的领域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
放在package.json
,如下所示:)
"repository": {
"type": "git",
"url": "git://github.com/username/repository.git"
}
Read more about the repository
field, and see the logged bug for further details.
(阅读有关repository
字段的更多repository
,并查看记录的错误以获取更多详细信息)
Additionally, as originally reported by @dan_nl , you can set private
key in your package.json
.
(此外, 正如@dan_nl最初报告的那样 ,您可以在package.json
设置private
。)
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.
(这不仅会阻止您在应用程序中意外运行npm publish
,还会阻止NPM打印有关package.json
问题的警告。)
{
"name": "my-super-amazing-app",
"version": "1.0.0",
"private": true
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…