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: self is not defined - Issue with whatwg-fetch when using the core lib with Node.js #1

Closed
adnanrahic opened this issue Dec 3, 2018 · 6 comments
Labels
enhancement New feature proposal
Milestone

Comments

@adnanrahic
Copy link
Contributor

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.

@adnanrahic
Copy link
Contributor Author

Here's another viable option, fetch-ponyfill.

@paveltiunov
Copy link
Member

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

@paveltiunov paveltiunov added the enhancement New feature proposal label Dec 5, 2018
@superzadeh
Copy link

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

@paveltiunov paveltiunov added this to Done in Schema Compiler via automation Apr 16, 2019
@paveltiunov paveltiunov added this to the v0.7.3 milestone Apr 16, 2019
@paveltiunov
Copy link
Member

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

@superzadeh
Copy link

superzadeh commented Apr 18, 2019

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

@paveltiunov
Copy link
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.

paveltiunov pushed a commit that referenced this issue Apr 29, 2019
* Initial work on ClickHouse driver

* Update dependencies

* added basic test including some fixes (#1)

* Added tests and made some fixes

* Generate custom query id

* Add support for parameter placeholders

* Enable join_use_nulls option

* Add reference to ClickHouse driver

* Add clickhouse option to the usage

* Update documentation

* Code formatting

* Enable session per connection in the pool
paveltiunov pushed a commit that referenced this issue Dec 14, 2019
…aracters (#289). Thanks to @philippefutureboy!

* fix(SqliteDriver.js): Fixed table schema parsing

#1 .match on line 52 returned null => fixed by removing the EOL character
#2 The describe table returns the name of the field between square brackets => fixed by removing the square brackets

* Added support for all escape symbols ((\[|`|")?)

Fix now supports all escape symbols and absence of escape symbol.
+ Refactored the `tables.map.reduce` to `tables.reduce` instead.
buntarb added a commit that referenced this issue Feb 4, 2022
buntarb added a commit that referenced this issue Feb 17, 2022
* wip

* refactoring around transformData

* refactoring types etc.

* types unifying and refactoring

* refactoring types

* refactoring end

* edge cases solution #1, some refactoring

* query type based values removed from compact response

* linting warning fix

* typo/linting fixes

* typo/linting fixes

* network protocol changes wip

* transformData general refactoring

* transformData general refactoring

* transformData general refactoring

* methods description added

* helpers unit tests

* helpers unit tests

* helpers unit tests

* helpers unit tests

* transformData ready and covered

* loadResponseInternal ready and covered

* yarn.lock updated with the @babel/preset-env and its deps

* compact transport added to the abstract test case

* resType flag moved to the query object

* added to the query Joi schema

* abstract test case restored

* birdbox result-type test added

* birdbox result-type added to the birdbox workflow

* birdbox result-type added to the birdbox workflow (cli)

* replaced to responseFormat, property moved to queryand client-core#load method

* fix CubejsApi#load definition

* fix CubejsApi#load definition

* birdbox respose type test typo fix and snapshots

* responseFormat e2e tests merged to the postgresql e2e tests

* cleaning up git workflow

* obsolete snapshot file removed

* BigQuery specific value processing removed from the transformValue

* Update abstract-test-case.ts

* fix test suit name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature proposal
Projects
No open projects
Development

No branches or pull requests

3 participants