Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
After upgrading aws-appsync-auth-link from 2.0.1 to 3.0.7, the following error occurs:
TypeError: Object prototype may only be an Object or null: undefined
at setPrototypeOf (<anonymous>)
1 | import fetch from 'node-fetch'
> 2 | import { createAuthLink } from 'aws-appsync-auth-link'
| ^
3 | import {
4 | ApolloClient,
5 | createHttpLink,
at extendStatics (node_modules/aws-appsync-auth-link/lib/auth-link.js:7:16)
at Object.<anonymous>.__extends (node_modules/aws-appsync-auth-link/lib/auth-link.js:10:9)
at node_modules/aws-appsync-auth-link/lib/auth-link.js:86:5
at Object.<anonymous> (node_modules/aws-appsync-auth-link/lib/auth-link.js:100:2)
at Object.<anonymous> (node_modules/aws-appsync-auth-link/lib/index.js:3:19)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Try using aws-appsync-auth-link@3.0.7 as described here but with @apollo/client@3.5.10
It seems like it's the same issue as described in https://github.com/aws-amplify/amplify-js/issues/4859#issuecomment-612459958
I can see that the error happens in exactly the same code but in node_modules/aws-appsync-auth-link/lib/auth-link.js instead of aws-amplify. Maybe it's a shared code that was fixed in aws-amplify in the PR I mentioned, but not in aws-appsync-auth-link@3.0.7
What is the expected behavior?
No error when using aws-appsync-auth-link@3.0.7
Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?
It's a React app.
Do you want to request a feature or report a bug? Report a bug
What is the current behavior? After upgrading
aws-appsync-auth-link
from2.0.1
to3.0.7
, the following error occurs:If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Try using
aws-appsync-auth-link@3.0.7
as described here but with@apollo/client@3.5.10
It seems like it's the same issue as described in https://github.com/aws-amplify/amplify-js/issues/4859#issuecomment-612459958 I can see that the error happens in exactly the same code but innode_modules/aws-appsync-auth-link/lib/auth-link.js
instead ofaws-amplify
. Maybe it's a shared code that was fixed inaws-amplify
in the PR I mentioned, but not inaws-appsync-auth-link@3.0.7
The code where the issue appears:
Here is
.babel.rc
in case it matters:What is the expected behavior? No error when using
aws-appsync-auth-link@3.0.7
Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions? It's a React app.