aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Bug: `sam build --build-in-source` does not reflect update in local dependency

Open hawflau opened this issue 1 year ago • 0 comments

Description:

After installing the local package and building , if you update the local package and then build again, it will not be reflected in the node_modules file.

Steps to reproduce:

  • Download sam-app.tar.gz, extract it
  • Go to the hello-world directory
  • install local packages
$ npm install ../utils/custom-response
  • build
$ cd ../
$ sam build --build-in-source
  • Update local packages (any update is fine)
vi utils/custom-response/index.js
  • Build again
$ sam build --build-in-source --no-cached
  • Check the packages under the node_modules directory
cat hello-world/node_modules/custom-response/index.js 

Observed result:

=> The content updated in step 5 is not reflected.

Expected result:

=> The content updated in step 5 should be reflected.

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

  1. OS:
  2. sam --version:
  3. AWS region:
# Paste the output of `sam --info` here

Add --debug flag to command you are running

hawflau avatar Oct 08 '24 23:10 hawflau