我在家中使用没有存储库的node.js,只是在乱搞.但是,当我运行 npm install 时,会收到 No Repository Field (无存储库字段)警告,如本其他问题线程.
I'm using node.js at home without a repository, just mucking around. But when I run npm install, I get the No Repository Field warning as discussed in this other question thread.
npmjs用两个示例描述了这个新的package.json字段假设我的仓库在git或svn中,而我的仓库都不在.我现在还没有使用存储库.我可以使用什么值?
npmjs describes this new package.json field with two examples assuming my repository is in either git or svn, but mine is in neither. I'm not using a repository just yet. What values can I use?
我尝试了空字符串,空值,甚至将Repository对象留空.
I tried empty strings, null values, and even leaving the Repository object empty.
推荐答案据我所知,您可以在package.json中指定"private": true,一些警告将被关闭.但是您不能将此类程序包发布到npm注册表.
As far as I remember, you can specify "private": true in your package.json, and some warnings will be turned off. But you can't publish such package to npm registry.
不幸的是,您无法在npm中完全关闭此警告.但是您可以使用 yapm 代替npm,因为这些警告已在该fork中删除(请参阅README).
Unfortunately, you can't turn off this warning in npm completely. But you can use yapm instead of npm, since these warnings are removed in that fork (see it's README).
PS:也就是说,如果您要向npm发布内容,通常最好将代码保留在可公开访问的版本控制系统中
PS: that said, if you're publishing something to npm, it's usually better to keep the code in the publicly accessible version control system
更多推荐
NPM警告“没有存储库字段".但我没有资料库
发布评论