Giter Club home page Giter Club logo

aws-crt-issue's Introduction

Issue

When using aws-iot-device-sdk-v2 package, which uses aws-crt, the package fails to load the aws-crt binary.

Error: AWS CRT binary not present in any of the following locations:
/var/task/node_modules/.pnpm/[email protected]/node_modules/aws-crt/dist/bin/linux-arm64-glibc/aws-crt-nodejs
    at Object.<anonymous> (/var/task/node_modules/.pnpm/[email protected]/node_modules/aws-crt/dist/native/binding.js:97:11)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/[email protected]/node_modules/aws-crt/dist/native/auth.js:20:35)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)

Things I've tried:

const site = new NextjsSite(stack, "site", {
  permissions: ["iot"],
  //@ts-ignore
  nodejs: {
    esbuild: {
      external: ["aws-iot-device-sdk-v2", "aws-crt"],
    },
  },
});
const site = new NextjsSite(stack, "site", {
  permissions: ["iot"],
  cdk: {
    server: {
      copyFiles: [
        {
          from: "linux-arm64-glibc/aws-crt-nodejs.node",
          to: "var/task/node_modules/.pnpm/[email protected]/node_modules/aws-crt/dist/bin/",
        },
      ],
    },
  },
});

I might be doing this wrong, but I tried copying the binary from linux-arm64-glibc/aws-crt-nodejs.node to var/task/node_modules/.pnpm/[email protected]/node_modules/aws-crt/dist/bin/ and a bunch of other places, but it still fails to load the binary.

aws-crt-issue's People

Contributors

nhamilton1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.