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

Error deploying to AWS Elastic Beanstalk #349

Open
3 tasks done
husseinamar opened this issue Jul 12, 2022 · 4 comments
Open
3 tasks done

Error deploying to AWS Elastic Beanstalk #349

husseinamar opened this issue Jul 12, 2022 · 4 comments

Comments

@husseinamar
Copy link

Welcome to the issues section if it's your first time!

Before creating an issue, please be sure to:

  • Checkout to the latest version, including submodules
  • Try to find an isolated way to reproduce the behavior
  • Fill in all the blanks in the most specific way you can

Steps to reproduce

  1. Create project
  2. Deploy to Elastic Beanstalk through Pipeline from Github Repo
  3. Wait for build to finish and be deployed, when it starts to run this happens

Expected behaviour

Run normally. I am developing on an M1 Macbook Air, everything works perfectly well with the prebuilt binaries, when I push the changes, the Pipeline shows that all packages were installed and finished building, but deploying to the instance fails because it can't start due to the below error. I tried rebuilding the binaries myself in the buildspec.yml file by moving argon2 to being a devDependancy on my local machine and then installing it for production using the buildspec.yml and and rebuilding afterwards, also didn't work.

Actual behaviour

Jul 12 08:42:40 ip-172-31-29-47 web: node:internal/modules/cjs/loader:1189
Jul 12 08:42:40 ip-172-31-29-47 web: return process.dlopen(module, path.toNamespacedPath(filename));
Jul 12 08:42:40 ip-172-31-29-47 web: ^
Jul 12 08:42:40 ip-172-31-29-47 web: Error: /var/app/current/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
Jul 12 08:42:40 ip-172-31-29-47 web: at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
Jul 12 08:42:40 ip-172-31-29-47 web: at Module.load (node:internal/modules/cjs/loader:981:32)
Jul 12 08:42:40 ip-172-31-29-47 web: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Jul 12 08:42:40 ip-172-31-29-47 web: at Module.require (node:internal/modules/cjs/loader:1005:19)
Jul 12 08:42:40 ip-172-31-29-47 web: at require (node:internal/modules/cjs/helpers:102:18)
Jul 12 08:42:40 ip-172-31-29-47 web: at Object. (/var/app/current/node_modules/argon2/argon2.js:6:25)
Jul 12 08:42:40 ip-172-31-29-47 web: at Module._compile (node:internal/modules/cjs/loader:1105:14)
Jul 12 08:42:40 ip-172-31-29-47 web: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
Jul 12 08:42:40 ip-172-31-29-47 web: at Module.load (node:internal/modules/cjs/loader:981:32)
Jul 12 08:42:40 ip-172-31-29-47 web: at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
Jul 12 08:42:40 ip-172-31-29-47 web: code: 'ERR_DLOPEN_FAILED'
Jul 12 08:42:40 ip-172-31-29-47 web: }
Jul 12 08:42:41 ip-172-31-29-47 web: node:internal/modules/cjs/loader:1189
Jul 12 08:42:41 ip-172-31-29-47 web: return process.dlopen(module, path.toNamespacedPath(filename));
Jul 12 08:42:41 ip-172-31-29-47 web: ^
Jul 12 08:42:41 ip-172-31-29-47 web: Error: /var/app/current/node_modules/argon2/lib/binding/napi-v3/argon2.node: cannot open shared object file: No such file or directory
Jul 12 08:42:41 ip-172-31-29-47 web: at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
Jul 12 08:42:41 ip-172-31-29-47 web: at Module.load (node:internal/modules/cjs/loader:981:32)
Jul 12 08:42:41 ip-172-31-29-47 web: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Jul 12 08:42:41 ip-172-31-29-47 web: at Module.require (node:internal/modules/cjs/loader:1005:19)
Jul 12 08:42:41 ip-172-31-29-47 web: at require (node:internal/modules/cjs/helpers:102:18)
Jul 12 08:42:41 ip-172-31-29-47 web: at Object. (/var/app/current/node_modules/argon2/argon2.js:6:25)
Jul 12 08:42:41 ip-172-31-29-47 web: at Module._compile (node:internal/modules/cjs/loader:1105:14)
Jul 12 08:42:41 ip-172-31-29-47 web: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
Jul 12 08:42:41 ip-172-31-29-47 web: at Module.load (node:internal/modules/cjs/loader:981:32)
Jul 12 08:42:41 ip-172-31-29-47 web: at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
Jul 12 08:42:41 ip-172-31-29-47 web: code: 'ERR_DLOPEN_FAILED'
Jul 12 08:42:41 ip-172-31-29-47 web: }

Environment

Operating system: 64bit Amazon Linux 2, t4g.medium instance

Node version: 16.15.0 / 8.5.5

Compiler version: gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)

@MatLeid
Copy link

MatLeid commented Feb 27, 2023

Hello, we ran into the same issue with AWS and Beanstalk (AWS Graviton instance type). Using argo version 0.30.3 and got the same error message.

Environment

Operation System: t4g.small

Node version: 14.20.1

Any help would be appreciated.

@faithfulojebiyi
Copy link

create a .npmrc file and add the following code
unsafe-perm=true

@husseinamar
Copy link
Author

create a .npmrc file and add the following code unsafe-perm=true

already have this in the root folder

@ranisalt
Copy link
Owner

This may have been caused by the way prebuilt binaries were download. It has been changed with 0.40.x and I hope it fixes your issue

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

4 participants