-
Notifications
You must be signed in to change notification settings - Fork 304
fix: toggle DENO_NO_PACKAGE_JSON conditionally
#4372
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
base: develop
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 18926015369Details
💛 - Coveralls |
| [functions.{{ . }}] | ||
| enabled = true | ||
| verify_jwt = true | ||
| use_package_json = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is the right fix. Based on their example, the error seems to be caused by health function failing to import package.json on Windows.
Most likely we have a bug in path resolution that's preventing package.json at root repo directory from being volume mounted into the edge runtime container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sweatybridge Hello qiao 😄
Well.... I think their reproduction code in that link you mentioned is definitely a bug, but I believe what they reproduce is actually a different bug that seems similar to the issue they're having.
Apparently, the cli is parsing the script directly and passing it a list of the paths that should be bound from the host to pass to Docker.
That link is reproducing a bug that occurred there, but the issue that originally caused that issue was that it was automatically reading the package.json and subtly changing the way the Deno codebase resolves modules.
This is a PR for that.
840f37d to
13e2832
Compare
DENO_NO_PACKAGE_JSONDENO_NO_PACKAGE_JSON conditionally
13e2832 to
ee7d48f
Compare
What kind of change does this PR introduce?
Enhancement
Description
Make CLI conditionally toggle
DENO_NO_PACKAGE_JSONbased on what files are in each function folder.This only applies when deploying functions locally/Docker and not using the deploy api.
Related supabase/supabase#38402
Towards FUNC-304