"[executing astro] ReferenceError: XMLHttpRequest is not defined"
Not sure how to resolve this and why this didn't show up for the demo video too. =(
Anyone has any idea?
Welcome to the Prismic community, and thanks for reaching out to us.
XMLHttpRequest is a built-in object in web browsers . Try to install it separately: (xmlhttprequest - npm),
- Install it with npm,
npm install xmlhttprequest
- Now, you can
require it in your code.
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var xhr = new XMLHttpRequest();
Let me know if it still doesn't solve your issue. I'll be happy to debug it more.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.