-
Notifications
You must be signed in to change notification settings - Fork 141
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
Support for local dependencies for Node.js build command #106
Conversation
Sync develop
Co-authored-by: Gojko Adzic <gojko@gojko.com>
Co-authored-by: Gojko Adzic <gojko@gojko.com>
tests for npm utils
… feat/local-dependencies
ensure json is unicode for python 2.7 madness
This requires 2 ways to think about it. Supporting the local use case (no mounting here, so it just works!) and then supporting this to work inside a container. Any local dependencies that are not mounted along with source code will break within the container, because they wont resolve. |
It would be helpful if some workaround was covered here, as well as, perhaps disambiguating from layers, or other alternatives. Claudia pack is suggested as a workaround but it not that clear how exactly to use that in a workflow. |
There was some conversations about this on this issue but will add details here as well. This is something we want to support but we have a some challenges due to how we currently build functions in SAM CLI, which is what is holding this up not because we don't want it merged. SAM CLI uses this library in order to build Lambda functions. SAM CLI mounts code into the container for each function. For the local dependency case (in the container), there is no way to build with local dependencies unless all the code is mounted, not just the CodeUri. To support this we need to change how we mount code into the container, most likely mount the project instead and execute As workarounds, you will need to build outside of |
I'll close this PR as it will not be merged anyway. |
That isn't completely true. Our intention is to merge this but we need to have additional work done in SAM CLI to make sure we can fully support the local dependency case in the |
It's 11 months old right now, and I guess it will be more than 18 months old when you can merge it, so I am sure it will be more complex to resolve conflicts than to rewrite it. I am no longer using the |
Issue #, if available:
Issue is not opened.
Description of changes:
Right now, Node.js builder can resolve dependencies from NPM or git, but it doesn't know how to resolve local dependencies. This PR allows users to have local dependencies, and even nested local dependencies in Node.js. For example, your package.json file can contain something similar to this:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.