lrony* 2013-05-30 04:18 采纳率: 0%
浏览 145
已采纳

没有仓库字段

I installed Express.js with the following command:

sudo npm install -g express

I get the following warnings:

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.

I'm new to Node.js and Express.js. Why do I have the above warnings? Should I be worried?

转载于:https://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field

  • 写回答

10条回答 默认 最新

  • csdnceshi62 2013-05-30 04:33
    关注

    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
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(9条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?