Skip to content

[Node]: [ReferenceError: XMLHttpRequest is not defined] #113

Closed

Description

@sannajammeh

We're getting [ReferenceError: XMLHttpRequest is not defined] and no logs flushed when trying to use @logtail/node. Why is logtail attempting to use XMLHttpRequest?

We are running Next.js with Node 20

Activity

  1. sannajammeh commented on May 3, 2024

    @sannajammeh
    Author

    You should bump cross-fetch to v4 which fixes this issue.

  2. curusarn commented on May 3, 2024

    @curusarn
    Contributor

    Hey @sannajammeh,

    Thanks a lot for raising this!
    I'm passing it on to the team. We'll get it fixed soon. We'll keep you updated here on GitHub.

    Thank you for reaching out.

  3. PetrHeinz commented on Sep 21, 2026

    @PetrHeinz
    Member

    Hi @sannajammeh, sorry for not updating on the issue here - the cross-fetch has been removed from dependencies in v0.5.4 already, and this is a complete non-issue in the later versions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions