next-wp icon indicating copy to clipboard operation
next-wp copied to clipboard

Error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Open naiserve opened this issue 1 year ago • 1 comments

how to fix

GET /posts 500 in 566ms GET /favicon.ico 200 in 85ms ⨯ SyntaxError: Unexpected token '<', ") at async getAllPosts (E:\next-wp-main.next\server\chunks\ssr[root of the server]__14f55d..js:747:19) at async Page (E:\next-wp-main.next\server\chunks\ssr[root of the server]__14f55d..js:1232:19) digest: "259562363" ⨯ SyntaxError: Unexpected token '<', ") at async getAllPosts (E:\next-wp-main.next\server\chunks\ssr[root of the server]__14f55d..js:747:19) at async Page (E:\next-wp-main.next\server\chunks\ssr[root of the server]__14f55d..js:1232:19) digest: "259562363" GET /posts 500 in 597ms GET /favicon.ico 200 in 62ms

naiserve avatar Oct 12 '24 09:10 naiserve

When you receive this error it means that the Rest API from your WP isn't readable.

https://jetpack.com/blog/wordpress-rest-api/

brijr avatar Oct 12 '24 20:10 brijr