Import module from gitlab server
Hi!
I want to import an npm module from my private gitlab server, the server and module itself do not require an auth tokenand are publibly accessible.
How do i add it to deno ?
If possible I want to avoid adding my own server to my npmrc and then importing it.
Found this:
https://docs.deno.com/runtime/fundamentals/node/#how-to-use-private-registries-with-deno
is this really necessary ? because the example only specifies 'private' repos, which does not apply to mine, i don't need a token
10 Replies
can't you use
https
urls to point to the package from GitLab?
I have not tried the package registry of GitLab yet myself, but i think you could try thatnpm packages in the package registry | GitLab Docs
GitLab product documentation.
Stack Overflow
How to expose Gitlab Package Registry without access token?
For access to gitlabs Package Registry, it requires the use of an access_token, like a private-token that is added to maven settings.xml. Otherwise the registry is not accessible.
https://docs.gitl...
And last link i found: https://gitlab.com/gitlab-org/gitlab/-/issues/324284
GitLab
Allow anonymous read-only access to a public project's generic pack...
Release notes Problem to solve I am using the generic package registry on a...
As far as i can tell all of these involve registering the registry in some way ?
This pretty much just "allows" pulling without an access token, but i want to avoid adding the registry alltogether
I think what you are asking for is like accessing a website without using DNS...
npm packages are all pulled/searched/etc from the npm site, so if you want to access your own server you need to tell npm how to reach your server right?
well, yeah but i assume there is some kind of direct link to the one package i want to pull.
Its very possible this is not possible or not supposed to be possible, which is fine by me as well.
Not possible. Npm modules can only be pulled if the registry is known to the npm client (in this case
deno
). This happens via .npmrc
.fair enough, thx!
how do i mark this as resolved?
I don't know. I'm not familiar enough with discord myself