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

ReferenceError: require is not defined #609

Open
loremaps opened this issue Nov 27, 2024 · 0 comments · May be fixed by #614
Open

ReferenceError: require is not defined #609

loremaps opened this issue Nov 27, 2024 · 0 comments · May be fixed by #614
Labels

Comments

@loremaps
Copy link

Describe the bug

When we send a message with an attachment that exceeds Messages.MAXIMUM_JSON_ATTACHMENT_SIZE causes the error:

ReferenceError: require is not defined

image

To Reproduce

Send a message with a pdf file attachment of more than 4MB in size. Use SDK version `7.6.2` and esm. 

Expected behavior

Send the message without an error.

SDK Version:

The issue happens with version 7.6.2. With version 7.5.2 is works.

It seems to be broken after implementation of #586

Additional context

{
  "app": {
    "app_start_time": "2024-11-26T06:43:21.196Z",
    "app_memory": 205467648,
    "free_memory": 164134912,
    "type": "app"
  },
  "browser": {
    "name": "axios",
    "version": "1.7.7",
    "type": "browser"
  },
  "culture": {
    "locale": "en-US",
    "timezone": "UTC",
    "type": "culture"
  },
  "device": {
    "arch": "x64",
    "memory_size": 16780316672,
    "free_memory": 10111979520,
    "boot_time": "2024-10-27T03:13:52.112Z",
    "processor_count": 2,
    "cpu_description": "Intel(R) Xeon(R) CPU @ 2.20GHz",
    "processor_frequency": 0,
    "type": "device"
  },
  "os": {
    "name": "Alpine Linux",
    "version": "3.20.3\n",
    "kernel_version": "6.1.100+",
    "type": "os"
  },
  "runtime": {
    "name": "node",
    "version": "v22.11.0",
    "type": "runtime"
  }
}
@loremaps loremaps added the bug label Nov 27, 2024
devin-ai-integration bot added a commit that referenced this issue Dec 24, 2024
- Remove form-data package dependency
- Add formdata-node and form-data-encoder packages
- Update code to use FormData from formdata-node
- Update test mocks to use formdata-node
- Handle ReadableStream attachments properly

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

Successfully merging a pull request may close this issue.

1 participant