zodern / mup-aws-beanstalk

Deploy Meteor apps to AWS Elastic Beanstalk using Meteor Up
127 stars 55 forks source link

Error on deploy node_modules/.bin/detect-libc: no such file or directory #135

Open jamauro opened 3 years ago

jamauro commented 3 years ago

In eb-engine.log

An error occurred during execution of command [app-deploy] - [StageApplication]. 
Stop running the command. 
Error: chown /var/app/staging/programs/server/npm/node_modules/.bin/detect-libc: no such file or directory

Has anyone else seen anything like this? Any ideas on how to resolve?

jamauro commented 3 years ago

I downloaded the bundle zip from the AWS console. It looks like all the files in /programs/server/npm/node_modules/.bin are empty. The file names are there but there is no content in the file.

@zodern any ideas? I'm on Meteor v2.3.2 and 64bit Amazon Linux 2 v5.4.4 running Node.js 14

I'm unable to reproduce locally with meteor build. I've also tried deleting node_modules and then using meteor npm install on my local.

This is what my mup.js in .deploy looks like:

module.exports = {
  app: {
    // Tells mup that the AWS Beanstalk plugin will manage the app
    type: 'aws-beanstalk',
    name: 'app-name',
    path: '../',
    env: {
        ROOT_URL: 'https://app.myapp.com',
        MONGO_URL: 'mongo://...'
    },
    auth: {
        id: 'id',
        secret: 'secret'
    },
    minInstances: 1,
  },
  plugins: ['mup-aws-beanstalk']
};
jamauro commented 3 years ago

After building with meteor build --directory /var/folders/xv/vr84w32s06568yvdbfb00n180000gn/T/mup-meteor-54ed96b3-7742-4be3-bf67-2e40df18be0f --architecture os.linux.x86_64 --server-only when I look at the bundle in that folder, the files in programs/server/npm/node_modules/.bin look good.

After archiving the bundle, when I unzip it, the files in programs/server/npm/node_modules/.bin no longer have content.

jamauro commented 3 years ago

Looks like archiver is stripping out those files I think because they are symlinked but I'm not sure.

For now, I'm using a different zip npm package to workaround this issue but would still like to figure out why archiver isn't working.

zodern commented 2 years ago

@jamauro which zip npm package are you using?

firefli-uk commented 8 months ago

In case it helps figure it out or anyone else, i've just encountered this issue running mup v1.5.10, aws-beanstalk v0.7.0 on a meteor v2.11.0 project that had been deploying fine to an Amazon Linux 2 environment. My issue was due to the use of the peerlibrary:reactive-mongo package for some server side reactivity. I didnt get a chance to dig any further but by backtracking and removing this package everything deployed without problems.

cunneen commented 5 months ago

I encountered the same issue as @firefli-uk , in the peerlibrary:fiber-utils package (which was included in the peerlibrary:reactive-mongo package).

This comment by @ivan133 helped: I downloaded the zip archive of the code and placed it in my packages folder.