Skip to content

Local NPM packages are not part of build for Node 14 runtime target #222

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

Closed
codyhazelwood opened this issue Feb 15, 2021 · 3 comments
Closed

Comments

@codyhazelwood
Copy link

Description:

When running sam build, local npm packages are not part of the build.

Steps to reproduce:

  • Create a local npm package somewhere outside of the code uri folder
  • Inside your code uri folder, run npm i ../../path to my local shared npm package
  • Run sam build

Observed result:

The local npm package is not installed

Expected result:

The local npm package to be installed.

I'm guessing this is due to sam building inside a docker container? Is there a way to tell sam to pull in these external files? I also tried symlinking the local module into the code uri folder, but that didn't work either.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS 10.15
  2. If using SAM CLI, sam --version: 1.18.0
  3. AWS region: haven't deployed, yet

Add --debug flag to any SAM CLI commands you are running

@mgrandis
Copy link
Contributor

@codyhazelwood
We have an ongoing PR to package local NPM dependencies that should help:
#215
I will see if I can make it move forward again.

@mgrandis mgrandis transferred this issue from aws/serverless-application-model Feb 16, 2021
@mgrandis mgrandis added area/workflow/node_npm stage/pr Has a PR ready for review labels Feb 16, 2021
@codyhazelwood
Copy link
Author

This PR looks like it will solve my issue. I'll keep an eye on it. Thanks!

@mndeveci
Copy link
Contributor

mndeveci commented Sep 5, 2023

This issue is currently been worked on here: aws/aws-sam-cli#4571

@mndeveci mndeveci closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants