ZweiEuro
ZweiEuro2w ago

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
©TriMoon™
©TriMoon™2w ago
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 that
©TriMoon™
©TriMoon™2w ago
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...
©TriMoon™
©TriMoon™2w ago
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...
ZweiEuro
ZweiEuroOP7d ago
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
©TriMoon™
©TriMoon™7d ago
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?
ZweiEuro
ZweiEuroOP7d ago
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.
marvinh.
marvinh.7d ago
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.
ZweiEuro
ZweiEuroOP7d ago
fair enough, thx! how do i mark this as resolved?
marvinh.
marvinh.7d ago
I don't know. I'm not familiar enough with discord myself

Did you find this page helpful?