-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
blocked/close-if-inactiveBlocked for >14 days with no response, will be closed if still inactive after 7 daysBlocked for >14 days with no response, will be closed if still inactive after 7 daysblocked/more-info-neededMore info is needed from the requester. If no response in 14 days, it will become stale.More info is needed from the requester. If no response in 14 days, it will become stale.
Description
Description:
When I try to build a Lambda function with the --manifest to locate the package.json, it throws an error:
ENOENT: no such file or directory, open '/private/var/folders/cf/ggmwqfwn03q443mj6vzryn0c0000gr/T/tmpch3vnyji/package.json'
Steps to reproduce:
Run the following command:
"sam build --manifest ./package.json --template services/expenses-service/template.yaml --parameter-overrides EnvType={args.EnvType} --beta-features --build-dir=.aws-sam/build/expenses-service --debug"
Observed result:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/aws-sam-cli/1.65.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflow.py", line 301, in run
action.execute()
File "/opt/homebrew/Cellar/aws-sam-cli/1.65.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflows/nodejs_npm/actions.py", line 114, in execute
raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: NPM Failed: npm WARN config production Use `--omit=dev` instead.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /private/var/folders/cf/ggmwqfwn03q443mj6vzryn0c0000gr/T/tmpsxb76scf/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/private/var/folders/cf/ggmwqfwn03q443mj6vzryn0c0000gr/T/tmpsxb76scf/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
Build Failed
Expected result:
Take the package.json from the specified location and build the Lambda.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: macOS Monterey V12.5.1
sam --version: SAM CLI, version 1.65.0- AWS region: us-east-1
Metadata
Metadata
Assignees
Labels
blocked/close-if-inactiveBlocked for >14 days with no response, will be closed if still inactive after 7 daysBlocked for >14 days with no response, will be closed if still inactive after 7 daysblocked/more-info-neededMore info is needed from the requester. If no response in 14 days, it will become stale.More info is needed from the requester. If no response in 14 days, it will become stale.