Skip to content

ReferenceError: self is not defined - Issue with whatwg-fetch when using the core lib with Node.js #1

Closed

Description

@adnanrahic

The core library is not compatible with Node.js because of the whatwg-fetch module. I'd suggest moving to an isomorphic alternative that works with both browsers and server.

Activity

  1. adnanrahic commented on Dec 3, 2018

    @adnanrahic
    ContributorAuthor

    Here's another viable option, fetch-ponyfill.

  2. paveltiunov commented on Dec 5, 2018

    @paveltiunov
    Member

    Hey @adnanrahic ! I think it makes sense to use isomorphic-fetch. Also continuous retry logic should be disabled as well.

  3. added
    enhancement
    on Dec 5, 2018
  4. superzadeh commented on Apr 16, 2019

    @superzadeh

    Also running into this while using Cube.js with Next.js. Pages have SSR enabled by default, and loading Cube.js becomes very tricky.

  5. added this to the v0.7.3 milestone on Apr 16, 2019
  6. paveltiunov commented on Apr 16, 2019

    @paveltiunov
    Member

    @superzadeh Hey Charles! We just replaced whatwg-fetch with isomorphic-fetch in 0.7.3. Could you please try?

  7. superzadeh commented on Apr 18, 2019

    @superzadeh

    Awesome! just upgraded and it works flawlessly, ❤
    Thank you so much, so far I'm really loving the project 👍

  8. paveltiunov commented on Apr 19, 2019

    @paveltiunov
    Member

    @superzadeh Hey Charles! Thanks for feedback! It's very interesting how you're using Next.js together with cube.js. Would love if you have a chance to write some tutorial blog post about that. Please reach me out in our Slack if you have some spare time.

  9. added a commit that references this issue on Feb 4, 2022
  10. added 4 commits that reference this issue on May 15, 2026
    2e77826
    1a12656
    e00d996
    22b28c9
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions