Custom NPM Registry

I cannot deploy to pages because on of my pacakages is not on npmjs's registery, rather a custom URL to a hosted Registry. This Registry does not have auth and I know it's url. How do I tell pages to use this for the package I need to install from there? I've tried: - Reading the docs to no avail (confusing on what you even need to do) - Trying to forcefully set the Registry using a preinstall hook - Including the tgz in the git repo and using file:<path> in pacakge.json to try installing from a file, didn't work. This is very frustrating to say the least. Please make this more clear in docs!
7 Replies
Sticks
Sticks3mo ago
@James might be able to shed some light on this, too.
Hello, I’m Allie!
?pings
Flare
Flare3mo ago
Please do not ping community members for non-moderation reasons. Doing so will not solve your issue faster and will make people less likely to want to help you.
James
James3mo ago
I only help people with Next.js stuff
Sticks
Sticks3mo ago
Apologies! I know James a little so I pinged em.
sochrisp
sochrisp3mo ago
@Sticks is your package scoped (i.e. @organization/<name-of-package>)? If so, the npm way of doing this is to specify the registry in your .npmrc file like:
@your-company:registry=https://registry.your-company-registry.npme.io/
registry=https://registry.npmjs.org/
@your-company:registry=https://registry.your-company-registry.npme.io/
registry=https://registry.npmjs.org/
More details on scoped packages here: https://docs.npmjs.com/cli/v10/using-npm/scope Whichever package manager your are using will resolve the package when installing the dep based on this. Shouldn't have anything to do with cloudflare.
scope | npm Docs
Scoped packages
Sticks
Sticks3mo ago
It is not, scoped, no.
Want results from more Discord servers?
Add your server