We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the issue According to https://arc.codes/docs/en/guides/developer-experience/dependency-management#relative-modules-%26-code-sharing-1, one can import relative modules in Lambdas (as in import .foo). First of all, the sample code in the documentation is not valid Python syntax:
import .foo
>>> import .foo File "<stdin>", line 1 import .foo ^ SyntaxError: invalid syntax
But secondly, the correct syntax, from . import foo, does not work in an Architect-managed Lambda. It fails with the following error message:
from . import foo
ImportError: attempted relative import with no known parent package
Steps to reproduce
npm install
npm start
Expected behavior Browser should display JSON response: {"hello": "world"}
{"hello": "world"}
Screenshots
Desktop Please complete the following information (if appropriate):
The text was updated successfully, but these errors were encountered:
Note that absolute imports of modules that are defined locally within the Lambda don't work either. See nasa-gcn/gcn.nasa.gov#1678.
Sorry, something went wrong.
No branches or pull requests
Describe the issue
According to https://arc.codes/docs/en/guides/developer-experience/dependency-management#relative-modules-%26-code-sharing-1, one can import relative modules in Lambdas (as in
import .foo
). First of all, the sample code in the documentation is not valid Python syntax:But secondly, the correct syntax,
from . import foo
, does not work in an Architect-managed Lambda. It fails with the following error message:Steps to reproduce
npm install
.npm start
.Expected behavior
Browser should display JSON response:
{"hello": "world"}
Screenshots
Desktop
Please complete the following information (if appropriate):
The text was updated successfully, but these errors were encountered: