-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
TypeError: _super.call is not a function #2785
Comments
something i am discovering is that this only works with |
I am also experiencing this issue in a non-react app. Still Investigating ... StackTrace on
I'm using BatchHttpLink and the InMemoryCache. The latter is being hydrated from the server-side. At first glance, thinking this may be a transpiliation issue with Apollo Client ... Debugging and breaking at the specific line has this:
where |
Same issue here, using parcel.js
|
Following apollo-link issue #248 , my workaround is by changing
to:
|
Same facing problem. It works with CRA but as I was trying it out with parcel it breaks. |
I'm using parcel-bundler and facing the same problem. I noticed it works fine with parcel-bundler = 1.2.1, and doesn't for parcel-bundler >= 1.3.0. |
so at this point i think its clear we have some symptoms but no idea as to the cause. is it a rollup issue or is it a parcel issue? |
Correct, I just tried with version If it's a parcel issue I guess we should move the issue over there. |
Might this be related to this issue? --> parcel-bundler/parcel#418 |
I have the same problem with rollup |
Same issue here; comes up in non-react environments |
HI! Any progress with this? |
as far as I am concerned this is wholly a parcel-bundler issue. i have not yet encountered this in webpack or other setups. please comment if you are facing this but NOT with parcel-bundler. we dont want to blame the wrong folks for the problem.z EDIT: ok webpack fix is below but parcel has no fix. please no more +1's I am muting this |
Adding this string replace loader to my webpack config fixed the problem for me:
|
@sw-yx I faced the problem in webpack |
@sw-yx webpack setup, ejected from react 16. |
@sw-yx No parcel-bundler to me. The issue is that I am using babel not typescript and the js version of apollo-link is using the wrong import (From babel point of view). I suggest apollo to provide a compiled ES5 version from the ts complier to resolve this issue. |
+1 |
2 similar comments
+1 |
+1 |
I am getting this in webpack also. It's a customised webpack config originally ejected from create-react-app; it is largely still vanilla. I tried the workaround with string-replace-loader but this did not work for me, although I get a slightly different error now:
|
I finally worked around it by adding the following to my babel rule in webpack config to exclude all apollo-* libraries from being processed:
|
|
As I noted in apollographql/apollo-link#248, the underlying issue is fixed in
I'm past my knowledge at this point on how yarn works to fix this (I would expect it to have installed |
@sw-yx I have this issue with Rollup. Repro:
|
If anyone is still encountering this issue with a modern version of Apollo Client, please let us know. Thanks! |
I was trying to refactor ApolloClient setup moving the instantiation of
|
Intended outcome:
Trying to get the basic react + apollo setup from the docs going
Actual outcome:
opaque error saying
TypeError: _super.call is not a function
. Full stack trace is here:How to reproduce the issue:
just following the docs at https://www.apollographql.com/docs/react/basics/setup.html
i see related issues here and here but nobody seems to have filed it in this repo yet so here i am doing it.
Version
The text was updated successfully, but these errors were encountered: