imranhsayed / woo-next

:rocket: React WooCommerce theme, built with Next JS, Webpack, Babel, Node, Express, using GraphQL and Apollo Client
https://codeytek.com/course/woocommerce-with-react-course/
879 stars 260 forks source link

Request to <endpoint>/graphql fail #102

Open alextaymx opened 2 years ago

alextaymx commented 2 years ago

Error: Unexpected token < in JSON at position 0

May I know what caused this issue? I installed the plugins listed on the README, but somehow the endpoint still couldnt work

alextaymx commented 2 years ago

ApolloError: Unexpected token < in JSON at position 0 at new ApolloError (/Users/alex/GitHub/woo-next/node_modules/@apollo/client/errors/errors.cjs.js:31:28) at /Users/alex/GitHub/woo-next/node_modules/@apollo/client/core/core.cjs.js:1492:19 at both (/Users/alex/GitHub/woo-

response: Response { size: 0, timeout: 0,

  [Symbol(Response internals)]: [Object]
},
statusCode: 404,
bodyText: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n' +
  '<html><head>\n' +
  '<title>404 Not Found</title>\n' +
  '</head><body>\n' +
  '<h1>Not Found</h1>\n' +
  '<p>The requested URL was not found on this server.</p>\n' +
  '</body></html>\n'

}, extraInfo: undefined, page: '/' }

imranhsayed commented 2 years ago

Did you try using these? https://github.com/imranhsayed/woo-next/tree/master/wordpress/plugins

edu-damasceno commented 2 years ago

I had a "maintenance mode" plugin active and I was having the same issue. I deleted it and it worked.