When doing a build on Plesk get error ECONNREFUSED ::1:80
Unanswered
Cinnamon Hummingbird posted this in #help-forum
Cinnamon HummingbirdOP
Here is the error message:
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
type: 'Error',
config: {
url: 'categories?search=&searchJoin=and&limit=100&sortedBy=DESC&orderBy=created_at',
method: 'get',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer ',
'User-Agent': 'axios/0.21.1'
},
I'm experiencing this problem on a server on Plesk.
I believe the error initiats in a request to get the products from an api. I create it in a reqest file like so:
const request = axios.create({
baseURL: process.env.NEXT_PUBLIC_REST_API_ENDPOINT || "https://mydomain.com", // TODO: take this api URL from env
timeout: 300000000,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
Then try to get it like so:
export class HttpClient {
static async get<T>(url: string, params?: unknown) {
const response = await request.get<T>(url, { params });
return response.data;
}
}
I believe the error is localhost:80 is not connecting but I have the connection set to the url.
Does anyone have any experience on building to deploy on plesk?
Build error occurredError: connect ECONNREFUSED ::1:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
type: 'Error',
config: {
url: 'categories?search=&searchJoin=and&limit=100&sortedBy=DESC&orderBy=created_at',
method: 'get',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer ',
'User-Agent': 'axios/0.21.1'
},
I'm experiencing this problem on a server on Plesk.
I believe the error initiats in a request to get the products from an api. I create it in a reqest file like so:
const request = axios.create({
baseURL: process.env.NEXT_PUBLIC_REST_API_ENDPOINT || "https://mydomain.com", // TODO: take this api URL from env
timeout: 300000000,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
Then try to get it like so:
export class HttpClient {
static async get<T>(url: string, params?: unknown) {
const response = await request.get<T>(url, { params });
return response.data;
}
}
I believe the error is localhost:80 is not connecting but I have the connection set to the url.
Does anyone have any experience on building to deploy on plesk?