A path other than / and retaining the scope #4940
Replies: 5 comments 1 reply
-
OK, FWIW, I set url_prefix: /artifactory/api/npm/npm-repo/ in the config file, and I ran verdaccio with the environment variable VERDACCIO_PUBLIC_URL='https://company.jfrog.io/artifactory/api/npm/npm-repo and when I ran I tested the result with direct access to our actual company jfrog restored, and it seemed able to update. So, this is kind of a workaround, however, I'd still rather emulate the way yarn 4 interacts with our company jfrog registry. |
Beta Was this translation helpful? Give feedback.
-
Setting things up as described in my previous comment seems to break the UI. If I browse to https://localhost:4873/ I get a blank screen, where before I would get a list of packages that are published, or a message saying that no packages are published. |
Beta Was this translation helpful? Give feedback.
-
OK, it's because verdaccio is running with a self-signed certificate. I can make a security exception for it and it's all good. |
Beta Was this translation helpful? Give feedback.
-
With the even though the publishing of the packages succeeded. |
Beta Was this translation helpful? Give feedback.
-
OK, looks like I had to type the proxy URL into the location, not the actual URL (i.e. https://company.jfrog.io instead of https://localhost:4873/) in order to get the list of published packages. |
Beta Was this translation helpful? Give feedback.
-
Can we add a configuration option to verdaccio so that it serves packages from a path other than /, and so it retains the scopes of packages that are published to it when serving them back? IOW, I'd like to be able to set my registry as http://localhost:4873/some/path instead of http://localhost:4873/, and I would like the name of the tarball of packages served by verdaccio to include the scope.
Motivation: I was able to set up my laptop with verdaccio and nginx to make it look like our company's jfrog repo:
/artifactory/api/npm/npm-repo
off the incoming path.node -r verdaccio.preload.js $(which verdaccio) -c /path/to/config/file.yml
) that overrides dns.lookup, giving the real IP for the JFrog domain instead of 127.0.0.1.With these steps, my configuration can point to what looks like our company jfrog domain, while in reality it goes through verdaccio running locally. Indeed, installing dependencies with
yarn
runs through verdaccio and works just fine.The problem is, when I run
yarn up <package_name>
, the resulting yarn.lock has the wrong paths:where the
^^^
sequences are missing.With the configuration options I request, I could upgrade packages such that the resulting yarn.lock changes could be committed, because they continue to point at our private registry.
Beta Was this translation helpful? Give feedback.
All reactions