globalThis.XMLHttpRequest is not a constructor
I am trying to use
wrangler deploy
to deploy my app, but it keeps giving this error. I am not using XMLHttpRequest afaik.
Dependencies:
wrangler.toml
Full error
6 Replies
Workers only support
fetch
, not XHR.
You probably have a dependency using it.
rollup-plugin-node-polyfills
- that shouldn't be throwing it.
It hasn't been updated for ~4 years.
It sounds like you have some code which is trying to load the http
NodeJS module.I would assume express uses XHR/http then, do you know of any alternatives?
They send interactions with my bot to my /interactions endpoint, after that I can handle it and respond
Got the hono server working, but now publish is throwing a different error:
There is also this, but I don't know where to specify this option.
Can you show your imports in the Worker?
There shoudn't be a
@hono/node-server
.Well I cant serve the server without it afaik
Ok nvm, I just needed to
export default app
Uncaught TypeError: fs_1.default.readdirSync is not a function
how much code do i need to replace??fs
isn't available since Workers don't have a filesystem, there is no disk.I switched to render so I don't have to deal with all these trade-offs