1
votes

I'm trying to publish a scoped npm package to Artifactory Online: my-company.jfrog.io/my-company

I'm experiencing the same problem described in this SO Question where I publish my package @scope/my-package and it deploys to Artifactory just fine but it winds up in the Artifactory Online path: npm-internal/@scope/my-package/-/@scope/my-package-1.2.3.tgz

When I run npm view @scope/my-package I get the 404 error:

npm ERR! 404 Not Found: @scope/my-package

In Artifactory, packages can be moved, and so I tried moving it from:

npm-internal/@scope/my-package/-/@scope/my-package-1.2.3.tgz

to

npm-internal/@scope/my-package-1.2.3.tgz

and try npm view @scope/my-package, get package details, and can perform an npm install @scope/my-package to install it.

Every answer I've found online has a solution to configure Tomcat to AllowEncodedSlashed. Is there an Artifactory Online equivalent?

I've rummaged through as much of the web app as I can think to rummage through to find anything resembling a configuration option to allow this to work and found nothing. I haven't found anything searching the docs.

1

1 Answers

1
votes

According to artifactory docs:

There are two ways to deploy packages to a local repository:

You can deploy a packed npm package to a specific path in your registry. Given this, the following can be performed:

npm run build
npm pack dist/
npm publish scope-my-package-1.2.3.tgz --registry https://my-company.jfrog.io/my-company/api/npm/internal-npm/@scope/my-package/
npm view @scope/my-package

And this works. The newly deployed package can be viewed now.