-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: sam build - FileNotFoundError, file is part of aws-sdk node module #6644
Comments
Hi there, Can you provide more details of your lambda function? Especially, if you can share simplified version of I was able to build a node20.x lambda function with following
|
Thanks for replying All lambda functions in the project use this package.json: `
` I wondered at the start - if the error is happening due to a file not found part of "@aws-sdk/client-ses": "^3.449.0", Is it failing because client-ses was upgraded to 3.5 recently, so the ^ would install 3.5 accordingly? It is very strange, during Copying artifacts from this all works, but then the next one fails, saying it is unable to find a node_module part of client-ses. Not sure what control I have over that instead of npm install, the module relies on other node modules which I cannot edit directly as it will overwrite |
Thanks for providing the
One problem I see about this one above is that there are multiple
Is it possible to provide a simplified example for us to reproduce it? |
I managed to resolve - it was a Windows error. Apparently there is a length limit in reading a filepath. I did the following to get this resolved: https://superuser.com/questions/1807770/enable-long-paths-on-win-11-home Definitely an issue that wasted time, good ol' Windows... |
Thanks for letting us know that you've resolve the issue (a Windows long path problem), I'm going to go ahead and resolve this. If there are any other issues that you face with SAM CLI, feel free to open a new issue to report it. |
|
Description:
sam build does not work. It gives an error message, file not found. The file not found references a part of node_modules of aws-sdk. I cannot simply edit these inside the .aws-sam/build folder as we know, this is a build folder and hence changes will be overwritten.
I am unable to find other users who have the same issue in terms of the context referencing a file not found in @AWS-SDK node_module which is strange,
Steps to reproduce:
sam build
Observed result:
Please see end of post to prevent duplication. In essence, during build process, a file is not found when copying artifacts which causes the process to terminate and fail.
Expected result:
The sam build process completes normally.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.98.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: