代码之家  ›  专栏  ›  技术社区  ›  Richard Rublev

npm warn no repository字段,no license字段

  •  0
  • Richard Rublev  · 技术社区  · 6 年前

    我下载了 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": {}
    }
    

    我在license.md里读过license,但我不知道该不该放在license或什么地方。 编辑 我试过了

     "license": "UNLICENSED",
    

    得到了和我之前发布的一样的警告。

    我的节点版本是4.2.6。

    1 回复  |  直到 6 年前
        1
  •  1
  •   hong4rc 6ark    6 年前

    它是 WARN ,不是 ERROR 是的。

    警告是因为你可能忘了 license repository .

    你不需要 许可证 存储库 是的。

    尝试使用此:

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

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