Skip to content

ApolloError: Unexpected token '<' #120

@pdenissen

Description

@pdenissen

Hi there,

Today I'm installing this theme for learning about querying Wordpress as a newbie at Next.
Now I'm getting this error below. Any idea what is going wrong or where to look at?

wait  - compiling...
event - compiled successfully
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
error - ApolloError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at new ApolloError (/Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/errors/errors.cjs.js:31:28)
    at /Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/core/core.cjs.js:1493:19
    at both (/Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/utilities/utilities.cjs.js:963:53)
    at /Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/utilities/utilities.cjs.js:956:72
    at new Promise (<anonymous>)
    at Object.then (/Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/utilities/utilities.cjs.js:956:24)
    at Object.error (/Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/utilities/utilities.cjs.js:964:49)
    at notifySubscription (/Users/pierredenissen/Domains/woo-next/node_modules/zen-observable/lib/Observable.js:140:18)
    at onNotify (/Users/pierredenissen/Domains/woo-next/node_modules/zen-observable/lib/Observable.js:179:3)
    at SubscriptionObserver.error (/Users/pierredenissen/Domains/woo-next/node_modules/zen-observable/lib/Observable.js:240:7) {
  graphQLErrors: [],
  networkError: SyntaxError [ServerParseError]: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
      at JSON.parse (<anonymous>)
      at /Users/pierredenissen/Domains/woo-next/node_modules/@apollo/client/link/http/http.cjs.js:18:25
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    response: Response {
      size: 0,
      timeout: 0,
      [Symbol(Body internals)]: [Object],
      [Symbol(Response internals)]: [Object]
    },
    statusCode: 404,
    bodyText: '<!DOCTYPE html>\n' +

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions