Closed zoucer closed 4 years ago
Unhandled Runtime Error TypeError: Only absolute URLs are supported
lib\api.js (2:20) @ fetchAPI
1 | async function fetchAPI(query, { variables } = {}) {
2 | const res = await fetch(${process.env.NEXT_PUBLIC_API_URL}/graphql, { | ^ 3 | method: 'POST', 4 | headers: { 5 | 'Content-Type': 'application/json',
${process.env.NEXT_PUBLIC_API_URL}/graphql
Did you solve it? I created a .env.local file, but I got the same error. (My OS is windows 10)
sovled, after I updated next verison to 9.4
Unhandled Runtime Error TypeError: Only absolute URLs are supported
lib\api.js (2:20) @ fetchAPI
1 | async function fetchAPI(query, { variables } = {}) {