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, open '/opt/lo.tar.br' #303

Open
cesarpachon opened this issue Feb 23, 2024 · 1 comment
Open

ENOENT: no such file or directory, open '/opt/lo.tar.br' #303

cesarpachon opened this issue Feb 23, 2024 · 1 comment

Comments

@cesarpachon
Copy link

hello! I am getting the error ENOENT: no such file or directory, open '/opt/lo.tar.br'
I am using the docker image, not the deprecated libreoffice-lambda-layer, so I am assuming lo.tar.br is included in the docker (that's right?)
I am trying to use the convertTo method.
am I missing something in my configuration?

this is my Dockerfile:

FROM public.ecr.aws/shelf/lambda-libreoffice-base:7.4-node16-x86_64
COPY mybundle.js ${LAMBDA_TASK_ROOT}
# our bundle excludes AWS-SDK, and it is not included in the libreoffice base docker image!
# we need to install it
COPY package.json ${LAMBDA_TASK_ROOT}
RUN npm install
CMD [ "mybundle.handler" ]

This is the CDK code:

   this.libreofficeFunction = new lambda.DockerImageFunction(this, 'reporterDocker'+this.env, {
      code: lambda.DockerImageCode.fromImageAsset('reporterdocker'),
      functionName: `reporterDocker${this.env}`,
      memorySize: 1024,
      ephemeralStorageSize: Size.mebibytes(1024),
      timeout: Duration.seconds(60),

   });

@cesarpachon
Copy link
Author

Silly error. As I was migrating from the lambda layer version to the new docker version, I didn't notice that my aws-lambda-libreoffice in the package.json was stuck in the old version. That is why I got the error about "lo.tar.br": that file was required for the layer version, but not in the new docker version.
After reinstalling the latest version of this library, the error is gone (now I have a different error, but that's another history)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant