Npm 发布问题 - Artifactory

问题描述 投票:0回答:2

我正在将一个 npm 库发布到神器上的 npm 存储库。该库是使用 Angular 构建的,dist 文件夹和 package.json 看起来正确。发布时,会发布其自身的请求,但不会发布实际的工件。

我在artifactory上看到的只是一个文件,而不是包含我的包的文件夹

跑步

npm publish

包.json

{
  "name": "@abce/embedded-auth",
  "version": "1.0.0-dev.0",
  "main": "bundles/abce-auth.umd.js",
  "module": "fesm5/abce-auth.js",
  "es2015": "fesm2015/abce-auth.js",
  "esm5": "esm5/abce-auth.js",
  "esm2015": "esm2015/abce-auth.js",
  "fesm5": "fesm5/abce.js",
  "fesm2015": "fesm2015/abce-auth.js",
  "typings": "abce-auth.d.ts",
  "metadata": "abce-auth.metadata.json",
  "sideEffects": false,
  "dependencies": {
    "tslib": "^1.9.0"
  }
}

实际发布到单个文件中的工件。

{
    "_id": "@abce/embedded-auth",
    "name": "@abce/embedded-auth",
    "dist-tags": {
        "latest": "1.0.0-dev.1"
    },
    "versions": {
        "1.0.0-dev.1": {
            "name": "@abce/embedded-auth",
            "version": "1.0.0-dev.1",
            "main": "bundles/abce-auth.umd.js",
            "module": "fesm5/abce-auth.js",
            "es2015": "fesm2015/abce-auth.js",
            "esm5": "esm5/abce-auth.js",
            "esm2015": "esm2015/abce-auth.js",
            "fesm5": "fesm5/abce-auth.js",
            "fesm2015": "fesm2015/abce-auth.js",
            "typings": "abce-auth.d.ts",
            "metadata": "abce-auth.metadata.json",
            "sideEffects": false,
            "dependencies": {
                "tslib": "^1.9.0"
            },
            "readme": "ERROR: No README data found!",
            "_id": "@abce/[email protected]",
            "_npmVersion": "6.4.1",
            "_nodeVersion": "10.15.3",
            "_npmUser": {
                "name": "deployment",
                "email": "[email protected]"
            },
            "maintainers": [
                {
                    "name": "deployment",
                    "email": "[email protected]"
                }
            ],
            "dist": {
                "integrity": "sha512-rpTN1sMpwnMwehzWUqbV+zElzaOlF5ekQRCQMncy6c+i4TAp5jbBobvzrhgl0ORqHgJn3Eo+EcrRgYLSjV7MdQ==",
                "shasum": "71f654dd5fddb20a9d5063171d5293424a4271c7",
                "tarball": "http://abce.jfrog.io/abce/internal-npm-dev/@abce/embedded-auth/-/@abce/embedded-auth-1.0.0-dev.1.tgz"
            }
        }
    },
    "readme": "ERROR: No README data found!",
    "maintainers": [
        {
            "name": "deployment",
            "email": "[email protected]"
        }
    ],
    "_attachments": {
        "@abce/embedded-auth-1.0.0-dev.1.tgz": {
            "content_type": "application/octet-stream",
            "data": "correctly populated tarball base64 data here. I checked it and it is correct",
            "length": 12092
        }
    }
}

期望:
我希望从请求中解析包并正确发布包

实际:
来自 npmpublish 命令的 put 请求数据被发布为文件

npm 版本:6.9.0
节点版本:v12.3.1(也已与10.15.3一起运行)

有什么想法吗?

npm artifactory publish
2个回答
1
投票

请检查您在 npm 中使用的注册表 URL,如果它不包含

/api/npm
- 则无效。

网址错误:

https://domain/artifactory/some-directory/

有效网址:
https://domain/artifactory/api/npm/some-directory/
.


0
投票

有什么解决办法吗?我有同样的问题,一切配置正确,npm 包发布正常,但包本身是一个文件而不是包的文件夹结构。

© www.soinside.com 2019 - 2024. All rights reserved.