Skip to content

Error: AWS CRT binary not present in any of the following locations on Nextjs app running npm run dev #496

Closed
@prakashmallow

Description

Describe the bug

I facing an issue while installing the aws-iot-device-sdk-v2 package. After importing iot and mqtt, I attempt to run the Next.js app using npm run dev but encounter the below errors

Error: AWS CRT binary not present in any of the following locations:
        /bin/darwin-arm64-cruntime/aws-crt-nodejs.node
    at eval (webpack-internal:///./node_modules/aws-crt/dist/native/binding.js:110:11)
    
- error node_modules/aws-crt/dist/native/binding.js (109:0) @ eval
- error Error: AWS CRT binary not present in any of the following locations:
        /bin/darwin-arm64-cruntime/aws-crt-nodejs.node
    at eval (webpack-internal:///./node_modules/aws-crt/dist/native/binding.js:110:11)

Expected Behavior

After importing iot and 'mqttfromaws-iot-device-sdk-v2` the nextjs app running as we expect normally

Current Behavior

Currently, it's throwing the below error we can import { it, mqtt } from 'aws-iot-device-sdk-v2' on the Nextjs app component and run on it.

Error: AWS CRT binary not present in any of the following locations:
        /bin/darwin-arm64-cruntime/aws-crt-nodejs.node
    at eval (webpack-internal:///./node_modules/aws-crt/dist/native/binding.js:110:11)
    
- error node_modules/aws-crt/dist/native/binding.js (109:0) @ eval
- error Error: AWS CRT binary not present in any of the following locations:
        /bin/darwin-arm64-cruntime/aws-crt-nodejs.node
    at eval (webpack-internal:///./node_modules/aws-crt/dist/native/binding.js:110:11)

Reproduction Steps

  1. Install aws-iot-device-sdk-v2 on the Nextjs app.
  2. import iot and mqtt from 'aws-iot-device-sdk-v2 and iot and mqtt APIs are used on the Nextjs app component.
  3. run npm run dev on terminal
  4. the above-mentioned mention error throwing on the terminal

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.19.5

Environment details (OS name and version, etc.)

| Environment | version |
| macOS | 14.4.1 |
| processer | m1 chip |
| node 20.12.1 |
| nextjs | 13.4.7 |

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions