You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this in my page.tsx as you mentioned in the readme. I also did an npm i and npm i vttl-api.
This is the code I have
// pages/index.js
"use client";
import { provinces, getClubs } from 'vttl-api';
export default async function Home() {
for (let province of provinces) {
let clubs = await getClubs({ ClubCategory: province.id });
}
return <div>Haai</div>
}
When I go to this page, I see in the logs: ⨯ ReferenceError: XMLHttpRequest is not defined at new Promise (<anonymous>) at Home (./app/page.tsx:13:77) digest: "4248625284" GET / 500 in 632ms
Without the code of vttl-api, it works.
Can you take a look at it?
Kr.
The text was updated successfully, but these errors were encountered:
Jan-DaCuMa
changed the title
Read
Readme default code ReferenceError: XMLHttpRequest
Jul 29, 2024
Running the package server side will not work as the official API is a SOAP XML api. The browser has a native XML parser, but node does not. So make sure getClubs runs on the client.
I have this in my page.tsx as you mentioned in the readme. I also did an
npm i
andnpm i vttl-api
.This is the code I have
When I go to this page, I see in the logs:
⨯ ReferenceError: XMLHttpRequest is not defined at new Promise (<anonymous>) at Home (./app/page.tsx:13:77) digest: "4248625284" GET / 500 in 632ms
Without the code of vttl-api, it works.
Can you take a look at it?
Kr.
The text was updated successfully, but these errors were encountered: