-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Self-hosted edge functions - Error when importing shared local files #149
Comments
I have the same issue |
🎉 This issue has been resolved in version 1.8.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
I have this issue too |
I also have this issue! |
@ginsudev @fraktalize Are you experiencing the issue when running via Supabase CLI? Have you tried upgrading to the latest version of the CLI? If you're running edge-runtime directly, can you share your setup so I can try to reproduce the issue. |
having the same issue today, this is is not fixed yet. |
same issue :( |
Also same issue; just updated the CLI. supabase-edge-runtime-1.33.5 |
@jb-thery @thewebbeckons Are you trying to import from |
@laktek Seems like mine was something different just reporting the same error message. Can disregard my comment; everything is resolved on my end. |
I have the same issue. Running 1.38.0. Once I moved it into the folder where the function resides, the issue got resolved. Here is the detailed error:
Here is excerpt from my
|
having similar issues |
I am having the same issue also. I use the same folder setup as per https://supabase.com/docs/guides/functions/quickstart#organizing-your-edge-functions My folder structure is as so:
My import_map.json looks like: If I import in either of the functions index.ts files something from @admin e.g. My IDE (VSCode) is happy, but I get the following runtime error when the function is invoked:
I have tired running the function by specifying the import_map.json file as an arg, by config.toml and also without specifying anything about an import_map.json file and I can't get it to work. e,g. Only by moving the admin.ts file into the my-handler-1 folder makes the import work, however this obviously makes it unable to be shared to my-handler-2/index.ts Has anyone else been able to share a local module between 2 functions successfully? If so, could you please post an example. |
Same issue, please fix it or suggest solution please. |
Not sure if this issue is directly related, but I get this error when importing json file locally using the debugger:
using this code:
with this test file
Seems like something do with the end of file character (line 3 column 2)... but there's nothing there... i have tried adding an extra line or deleting any whitespace after it, still fires the same issue. This only occurs when using the debugger, or the ''--inspect" flag. |
same issue here |
Bug report
Describe the bug
Calling an edge function that imports local files from the
_shared
directory produces the following error:Within the
supabase-edge-functions
container logs I see the following error:To Reproduce
/functions/_shared/message.ts
:/functions/hello/index.ts
to import the function from that file:docker compose down
anddocker compose up
to ensure the new file is present within the container.http://localhost:8000/functions/v1/hello
Expected behavior
I'm expecting the message
Hello from Edge Functions!
to be displayed, but instead, I see{"msg":"InvalidWorkerCreation: worker boot error"}
System information
Additional context
If I move the
_shared
directory underneath hello:/functions/hello/_shared/
, and alter the import statement within/hello/index.ts
toimport { message } from "./_shared/message.ts";
, then it works fine.The text was updated successfully, but these errors were encountered: