GraphQL build error when deploying at Vercel

Viewed 272

I'm trying to deploy my Nextjs app to Vercel, I am using strapi backend deployed at Heroku...

Unfortunately I am stuck at this build error at Vercel....

I have googled and tried to find a solution but unfortunately I can't and have no idea what to do.

Any ideas appreciated....

> Build error occurred
Error: Unexpected token M in JSON at position 0
    at new ApolloError (/vercel/path0/node_modules/@apollo/client/errors/errors.cjs:34:28)
    at /vercel/path0/node_modules/@apollo/client/core/core.cjs:1595:19
    at both (/vercel/path0/node_modules/@apollo/client/utilities/utilities.cjs:986:53)
    at /vercel/path0/node_modules/@apollo/client/utilities/utilities.cjs:979:72
    at new Promise (<anonymous>)
    at Object.then (/vercel/path0/node_modules/@apollo/client/utilities/utilities.cjs:979:24)
    at Object.error (/vercel/path0/node_modules/@apollo/client/utilities/utilities.cjs:987:49)
    at notifySubscription (/vercel/path0/node_modules/zen-observable/lib/Observable.js:140:18)
    at onNotify (/vercel/path0/node_modules/zen-observable/lib/Observable.js:179:3)
    at SubscriptionObserver.error (/vercel/path0/node_modules/zen-observable/lib/Observable.js:240:7) {
  type: 'ApolloError',
  graphQLErrors: [],
  clientErrors: [],
  networkError: {
    name: 'ServerParseError',
    response: { size: 0, timeout: 0 },
    statusCode: 405,
    bodyText: 'Method Not Allowed'
  }
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1
0 Answers
Related