npm WARN 没有存储库字段,没有许可证字段

Posted

技术标签:

【中文标题】npm WARN 没有存储库字段,没有许可证字段【英文标题】:npm WARN No repository field,No licence field 【发布时间】:2018-12-22 13:05:44 【问题描述】:

我下载了teams-for-linux

当我尝试时

cd app && npm i
teams-for-linux@0.0.8 /home/milenko/teams-for-linux/app
└── ajv@6.5.2  extraneous

npm WARN teams-for-linux@0.0.8 No repository field.
npm WARN teams-for-linux@0.0.8 No license field.

我不知道应该如何在 package.json 中编辑许可证


  "name": "teams-for-linux",
  "version": "0.0.8",
  "description": "Unofficial client for Microsoft Teams for Linux",
  "homepage": "https://github.com/ivelkov/teams-for-linux",
  "keywords": [
    "Teams",
    "Microsoft Teams"
  ],
  "repository": 
    "type": "git",
    "url": "git+ssh://github.com/ivelkov/teams-for-linux"
  ,
  "author": "Ivelin Velkov <ivelin.velkov@gmail.com>",
  "license": "SEE LICENSE IN LICENSE.md",
  "scripts": 
    "start": "electron ./app",
    "start-debug": "WEB_DEBUG=1 electron --disable-http-cache ./app",
    "pack": "build --dir",
    "dist": "build"
  ,
  "devDependencies": 
    "electron": "^1.8.4",
    "electron-builder": "^20.8.2"
  ,
  "build": 
    "appId": "teams-for-linux",
    "asar": false,
    "linux": 
      "category": "Network;Chat",
      "packageCategory": "net",
      "executableName": "teams",
      "synopsis": "Microsoft Teams for Linux",
      "description": "Unofficial Microsoft Teams client for Linux using Electron. It uses the Web App\n and wraps it as a standalone application using Electron.",
      "desktop": 
        "Name": "Microsoft Teams for Linux",
        "Comment": "Unofficial client for Microsoft Teams for Linux",
        "StartupWMClass": "teams-for-linux"
      ,
      "target": [
        "rpm",
        "deb",
        "pacman",
        "tar.gz"
      ]
    
  ,
  "dependencies": 

我已经阅读了 licence.md 中的许可证,但我不知道是否应该放置无许可证或什么。 编辑 我试过了

 "license": "UNLICENSED",

收到与我之前发布的相同的警告。

我的节点版本是4.2.6。

【问题讨论】:

这只是一个作为警告记录的通知,即这两个字段不在模块的 package.json 文件中。你可以忽略它。更多信息在这里:***.com/questions/16827858/… 这能回答你的问题吗? npm WARN package.json: No repository field 【参考方案1】:

WARN,不是ERROR

它发出警告是因为您可能忘记了licenserepository

您不需要licenserepository

试试这个:

"repository": 
  "type": "git",
  "url": "https://github.com/ivelkov/teams-for-linux.git"

如果你没有,不需要添加它,检查SPDX License List。

【讨论】:

以上是关于npm WARN 没有存储库字段,没有许可证字段的主要内容,如果未能解决你的问题,请参考以下文章

npm WARN package.json Stock@0.0.1 没有存储库字段

我无法在我的Ionic项目文件夹中安装npm软件包并获得错误提示:没有存储库字段。没有许可证字段。怎么解决?

NPM 警告“没有存储库字段”,但我没有存储库

在 src 文件夹上运行 npm install 后,它显示没有找到存储库 [重复]

如果我的代码仅供我工作的公司使用,我应该在 package.json 的许可字段中输入啥?

如何在文本字段中允许和获取拟我表情贴纸