colbyfayock / next-wpgraphql-basic-starter

https://next-wpgraphql-basic-starter.netlify.app
44 stars 14 forks source link

ApolloError: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal at new ApolloError #2

Open NafiurSiddiqui opened 1 year ago

NafiurSiddiqui commented 1 year ago

Hey Colby,

I was trying out this template and I get this error after spinning up the npm run dev. Any directions from here? 😅

error - ApolloError: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal
    at new ApolloError (D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\@apollo\client\errors\errors.cjs:34:28)
    at D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\@apollo\client\core\core.cjs:1658:19
    at both (D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\@apollo\client\utilities\utilities.cjs:985:53)
    at D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\@apollo\client\utilities\utilities.cjs:978:72
    at new Promise (<anonymous>)
    at Object.then (D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\@apollo\client\utilities\utilities.cjs:978:24)
    at SubscriptionObserver.error (D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\zen-observable\lib\Observable.js:240:7) {
    at SubscriptionObserver.error (D:\fullStack\pc\next-wpgraphql-basic-starter\node_modules\zen-observable\lib\Observable.js:240:7) {
  graphQLErrors: [],
  clientErrors: [],
      at Object.fetch (node:internal/deps/undici/undici:11413:11)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    code: 'ERR_INVALID_ARG_TYPE'
  },
  extraInfo: undefined,
  page: '/'
}

I am using node > v19

colbyfayock commented 1 year ago

hey unsure about this specific error but i upgraded all of the packages and tested this locally with my wordpress project on node 18 and seems to be good to go

this project isn't heavily maintained, so its a bit dated at this point

can you confirm if its working now for you or not?

if you want to test locally, i simply ran yarn upgrade --latest where the only thing i had to change in code was remove the <a> from the <Link>

https://github.com/colbyfayock/next-wpgraphql-basic-starter/commit/8e45c108f45ea348bc20e134102c459a24d5bd1f