Skip to content
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

ENOENT: no such file or directory, stat .../#current-cloud-backend/<lambda-layer-path>/.../node_gyp_bins/python3 #13762

Closed
2 tasks done
olehrdk opened this issue May 3, 2024 · 2 comments
Labels
pending-triage Issue is pending triage

Comments

@olehrdk
Copy link

olehrdk commented May 3, 2024

How did you install the Amplify CLI?

npm install -g @aws-amplify/cli

If applicable, what version of Node.js are you using?

v18.10.0

Amplify CLI Version

12.11.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

As a workaround made changes described here.
Workaround works but it is annoying to do it every time you push

Describe the bug

After running amplify env checkout <env_name> or amplify push I receive an error Could not initialize platform for <env>: ENOENT: no such file or directory, stat '.../amplify/.temp/#current-cloud-backend/function/<lambda-layer-name>/lib/nodejs/node_modules/bigint-buffer/build/node_gyp_bins/python3'

Expected behavior

Expected behavior is to have working checkout and push without doing workaround mentioned above

Reproduction steps

  1. Create lambda layer
  2. After adding dependency which contains bigint-buffer dependency - deployment stoped working (@solana/web3.js & @coral-xyz/anchor)
  3. amplify env checkout <env_name>

Project Identifier

Project Identifier: 3bc790f8c3b45bfb3ee61223c142b17d

Log output

# Put your logs below this line
2024-05-03T12:03:13.020Z|info : amplify env core checkout dev 
2024-05-03T12:03:19.360Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},null])
2024-05-03T12:03:19.367Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]thdapp-[***]ev-[***]444-[***]ment"}])
2024-05-03T12:05:36.724Z|error : Could not initialize platform for 'dev': ENOENT: no such file or directory, stat '.../amplify/.temp/#current-cloud-backend/function/<lambda-layer-name>/lib/nodejs/node_modules/bigint-buffer/build/node_gyp_bins/python3'
ProjectInitFault: Could not initialize platform for 'dev': ENOENT: no such file or directory, stat '.../amplify/.temp/#current-cloud-backend/function/<lambda-layer-name>/lib/nodejs/node_modules/bigint-buffer/build/node_gyp_bins/python3'

Additional information

Workaround which worked for me is here.
Also tried adding pre-build.sh script (deployed it with workaround):

cd ./amplify/backend/function/<layer-name>/lib/nodejs
yarn install --no-bin-links

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@olehrdk olehrdk added the pending-triage Issue is pending triage label May 3, 2024
@olehrdk olehrdk changed the title ENOENT: no such file or directory, stat .../#current-cloud-backend/<lambda-layer-path>/node_gyp_bins/python3 ENOENT: no such file or directory, stat .../#current-cloud-backend/<lambda-layer-path>/.../node_gyp_bins/python3 May 3, 2024
@ykethan
Copy link
Member

ykethan commented May 3, 2024

Hey @olehrdk, thank you for reaching out. The issue is currently being tracked on #6144 with comments providing additional information.
Closing this issue as duplicate to track #6144

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Copy link

github-actions bot commented May 3, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants