-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supabase functions serve
and private packages
#2979
Comments
@elyobo I looked into this and made it work locally with the current cli version as follows:
#.npmrc
@johnbra:registry="https://npm.pkg.github.com"
//npm.pkg.github.com/:_authToken=<TOKEN>
registry=https://registry.npmjs.org/
import { appendExclamationMark } from "npm:@johnbra/[email protected]";
// ... Currently, the local directory I'm not sure if I'm missing something, but I think this should solve your problem since the I haven't tested if this works with the |
Thanks @JohnBra, if that's the case that's pretty manageable, I'll give it a go. |
Glad to help @elyobo! |
@elyobo did that work for you? |
The import maps docs have had a few changes in recent times that seem relevant and they're strongly recommending " I see the same behaviour as you (and I can see that this was documented that way earlier, but it's now recommended against although still documented as an option) with a Anyway, this seems to be working as per the docs. My "Describe the solution you'd like" answer would like the general |
Closing because this does work as documented now. Minimal benefit (and possible confusion when it fails to deploy) from my suggestion of picking up a local |
Is your feature request related to a problem? Please describe.
Support for
.npmrc
authentication for private packages was added in supabase/edge-runtime#427 but in order for private packages to work a.npmrc
needs to be placed in the directory for each and every function.Describe the solution you'd like
For local development, it would be great to respect the general
.npmrc
rules (find the cloest up the directory structure).For deployment to production, a
.npmrc
insupabase/functions
that's used for all would probably make sense (and this would fit with the suggestion above).Describe alternatives you've considered
Adding
.npmrc
to the.gitignore
and copying them to each directory as required is viable, but the requirement should be spelled out in docs I guess (although I don't know where I would have expected to find them).Additional context
N/A
The text was updated successfully, but these errors were encountered: