Suddenly having issues with AWS-S3 PutObject to R2 Object Storage

Seems like this issue appeared about 1.5 days ago with my users reporting that their uploading is failing.

Detailed error: {
  error:  [Error: Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly. 
You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";]. 
For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt] {
  $metadata: { attempts: 1, totalRetryDelay: 0 }
},


Not sure how to go about this issue -- The code was never editted in the past 1.5 days, and this error occurs on all environments.

Any help would be appreciated.

The code is trying to do PutObjectCommand via
      await s3Client.send(new PutObjectCommand({
        Bucket: process.env.R2_BUCKET_NAME,
        Key: key,
        Body: JSON.stringify(newMetadata, null, 2),
        ContentType: 'application/json',
        ACL: 'public-read',
      }));


Since my NextJs site is on cloudflare pages edge run time, I can't just install the crc64-nvme package as that is not supported on the edge runtime. Any help would be sincerely appreciated
Was this page helpful?